Challenge: Sorted Insert

Learn how to solve the sorted insert problem using stack.

Problem

Given a stack whose elements are sorted, write a function that will insert elements in the sorted order, with the highest element at the top and the lowest element at the bottom.

Get hands-on with 1400+ tech skills courses.