Exercise: sort mixed string - video
Exercise: sort mixed string
In a file we have the following strings: A1 B1 A27 A3 ... each string has a single letter at the beginning and then a number.
Sort them first based on the first letter and among values with the same leading letter sort them according to the numbers so the above values would be in the following order:
A1 A3 A27 B1
File:
A1 A27 C1 B1 B12 A38 B3 A3
Published on 2015-07-03
If you have any comments or questions, feel free to post them on the source of this page in GitHub. Source on GitHub.
Comment on this post