For exam review:
Given a stack S1 with n numbers and an empty stack S2, design analgorithm (and write psudeocode for it) to sort all the numbers(from small on top to large on bottom) and store them in theoriginally empty stack S2, using only the stack ADT functions withthe two given stacks, and a fixed number (independent of n) of intand char variables. What is the time complexity of your algorithm(related to n) in the BEST/WORST case?