Sorted List Property

result of sorting [ ] with sorted stack sl = sl

If the list is empty, then we have finished sorting, and the result is the current "sorted" list.

Examples

result of sorting [ ] with sorted stack [ 7, [ ] ] = [ 7, [ ] ]

result of sorting [ ] with sorted stack [ 2, [ 3, [ 4, [ ] ] ] ] = [ 2, [ 3, [ 4, [ ] ] ] ]

result of sorting [ ] with sorted stack [ 1400, [ 2150, [ 3305, [ ] ] ] ] = [ 1400, [ 2150, [ 3305, [ ] ] ] ]


Comments

Please log in to add comments