Monday, April 4, 2011

Stack Sorting in place.

Sort the stack in place.

input:
5
3
5
4
1
2
output:
Sorted Stack:
5 4 3 2 1


No comments:

Post a Comment