Computer Science, asked by jstbhaskar, 9 months ago

On the occasion of annual day in school, the principal of the school decides
that he will distribute chocolates to students. The principle orders the students
to stand in a queue and the teachers have four types of chocolates. He wants
to distribute chocolates in such a manner that neighbouring students will not
receive the same chocolate.
If ith student receives type-2 chocolate then, (i-1)th and (i+1)th will not receive
type-2 chocolates. The principle wants to know the minimum money needed to
distribute the chocolate. It is not necessary that chocolates of the same
type are equal in price.

i need answer in java prompt ​

Answers

Answered by sushantjaiswal420
15

Answer:

Boy your are giving virtsua test??

Btw this question required dp approach

Explanation:

Answered by ZareenaTabassum
0

Java is a very capable overall language of programming.

  • It is employed to create both desktop and mobile apps, as well as big data analytics and microcontrollers.
  • Java had traditionally always been go-to software program for developing Web applications, Android applications, and software creation tools like Eclipse, Node Js, and Beans IDE. Tools for creation.
  • Perhaps one Java's greatest exciting aspects is the "Integrated Development Environment". (IDE).
  • Java is simple to master.
  • Java is created to just be simple to use, making it easier to write, build, troubleshoot, and understand than some other scripting languages.
  • Java is an object-orientated language.
  • This enables the creation of modular programmes and reuse code.

SPJ2

Attachments:
Similar questions