Given a Stream of 0s and 1s (010101....), all 0s should appear before 1s. How to approach this question for a stream of numbers?