HackerRank - Sort Command #2
April - 25/2025
Problem:
In this challenge, we practice using the sort command to sort input in text or TSV formats. Given a text
file, order the lines in reverse lexicographical order (i.e. Z-A instead of A-Z).
# Input
- Dr. Rajendra Prasad January 26, 1950 May 13, 1962
- Dr. S. Radhakrishnan May 13, 1962 May 13, 1967
- ...
# Output
- Shri Varahagiri Venkata Giri August 24, 1969 August 24, 1974
- Shri Neelam Sanjiva Reddy July 25, 1977 July 25, 198
- ...
# Solution
sort -r
Post: