A boy is asked to put in a basket one mango when ordered 'One', one orange when ordered 'Two', one apple when ordered 'Three' and is asked to take out from the basket one mango and orange when ordered 'Four'. A sequence of orders is given as 12332142314223314113234 . How many total oranges were in the basked at the end of the above sequence?
Step-by-step Solution:
The most efficient way to solve this is to focus only on the oranges, counting the total number added and the total number removed, while ignoring the apples and mangoes.
Sequence: 1233214223314113234
The final number of oranges is the total added minus the total removed.
5 (added) - 3 (removed) = 2
Final Answer: After the entire sequence of orders is completed, there are 2 oranges left in the basket.