JAVA code using Stack

panas94

 

In each plastic container of Pez candy, the colors are stored in random order.  Your little brother likes only the yellow ones, so he painstakingly takes out all the candies, one by one, eats the yellow ones, and keeps the others in order, so that he can return them to the container in exactly the same order as before -- minus the yellow candies, of course.  

    • 6 years ago
    • 20
    Answer(1)

    Purchase the answer to view it

    • Java-20-4-2020.txt
    • WhatsAppImage2020-04-20at4.12.24AM.jpeg