Topic: Stack Problem / Level: intermediate

Problem: Write a program to sort a stack such that the smallest elements are on the top.

Run the code to see the output here...