You have two jars, one jar which has 10 rings and the other has none. They are placed one above the other. You want to remove the last ring in the jar. And the second jar is weak and cannot be used to store rings for a long time.
A. Empty the first jar by removing it one by one from the first jar and placing it into the second jar
B. Empty the first jar by removing it one by one from the first jar and placing it into the second jar and empty the second jar by placing all the rings into the first jar one by one
C. There exists no possible way to do this
D. Break the jar and remove the last one
Answer:B
You have two jars, one jar which has 10 rings and the other has none. They are placed one above the other. You want to remove the last ring in the jar. And the second jar is weak and cannot be used to store rings for a long time.
A. Empty the first jar by removing it one by one from the first jar and placing it into the second jar B. Empty the first jar by removing it one by one from the first jar and placing it into the second jar and empty the second jar by placing all the rings into the first jar one by one C. There exists no possible way to do this D. Break the jar and remove the last one
Explanation: This is equivalent to just using push and pop to execute a dequeue process. The contents of the first jar are passed to the second jar. Remove all of the elements from the second jar and put them in the first jar after removing the last element from the first jar.