AlphaStream Interview Question

Stack sorting using temporary stack