LinkedIn Interview Question

Given a stack, sort it.