It sorts streams of numbers ascendingly by their natural order.
Input | Output |
---|---|
[2,7,4,3]
|
[2,3,4,7]
|
[5,3,3,3]
|
[3,3,3,5]
|
It leaves empty streams unchanged.
Input | Output |
---|---|
[]
|
[]
|
It sorts streams of strings lexically.
Input | Output |
---|---|
["f","a","c"]
|
["a","c","f"]
|
["f","","c","abc"]
|
["","abc","c","f"]
|