Ordering strings of varying length lexicographically

Sign in to test your solution.