Lexographical sorting problem
- by Shawn Mclean
I'm doing a problem that says concatenate the words to generate the lexicographically lowest possible string. from a competition.
Take for example this string: jibw ji jp bw jibw
The actual output turns out to be: bw jibw jibw ji jp
When I do sorting on this, I get: bw ji jibw jibw jp.
Does this mean that this is not sorting? If it is sorting,…