Urgent! Help Please!
Hi, this is not a homework assignment... my school prof just wanted us to solve the problem so we can discuss it in class as a group. English is my second language and this question is quite tough for me... It would be great if you can help. Thank you~
first) Tommy is a 7 year old boy. In his room is a shelf with 10 boxes of toys. His mother made him organized his toys and she helped him placed a piece of masking tape on the bottom of each of the 10 boxes specifying what is in them (e.g. balls, action figures, games, etc.). One day his mother decided to clean Tommy's room. Now she wants to sort the boxes according to what is in them, from left to right so that the leftmost box is the one whole name specifying what is in it comes first alphabetically. Assume that the mother can pick up only 1 box in each hand at a time and that the box must either be in the mother's hand or on the shelf (that is, she cannot put them down anywhere else). Note that the mother may pick one box up in her hand and slide another box along the shelf with her free hand. Explain in plain English (i.e. give an algorithm) how the mother can sort the boxes properly.
second )Assume now there are exactly two shelfs and that the mother can make use of the second shelf to place the boxes on. Can you describe a better way of sorting the boxes ? Perhaps there is a quicker way or a way that involves the use of only one hand.
Thanks for your help!
By devsriram in forum .NET
Last Post: 11-02-2006, 06:57 AM
By precious in forum Enterprise
Last Post: 06-23-2001, 02:34 PM
By barnaboss in forum Java
Last Post: 03-15-2001, 11:54 AM
By Rishi Dhruv in forum Web
Last Post: 10-20-2000, 06:54 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center