We have two boxes, one of the boxes put respectively in increasing order of the numbered 1-100 100 balls, now our words from the box on the number of the first ball in order to the ball, whenever count to three, to take out the location of the ball from the, into another box, and then continue to start from the next ball number 1, when the count to 3, remove the ball into another box, take out the back of the ball before, so repeatedly, until the number to the last ball, return to the first ball position, count not interrupt, until the word is only a small ball in the box,
Question 1, how much is this ball of digital,
2, another box of word ball number order, with most familiar programming language or pseudo code, write the problem solving method, or explain their thinking,
CodePudding user response:
1. This is not sorted2. Use LinkedList
3. While loop
4. Simple several time cycle time, reduce the cycle can be directly add 3, completes the set length judge good
5. Simply isn't worth mentioning another box order
6. The question is very simple, you can do what I say
CodePudding user response:
Thank you, help to meCodePudding user response: