Challenge: Sort Stack
Let’s sort the elements of a stack.
Problem
Given a stack, sort elements such that the largest value is at the top.
Input
A stack of integers.
Let’s sort the elements of a stack.
Given a stack, sort elements such that the largest value is at the top.
A stack of integers.