P.I. For Hire "Shrewd Shrews" job, you'll find a locked door on the ground floor, left of where you come out of the elevator.
# Given an integer n, return all the numbers in the range [1, n] sorted in lexicographical order. # You must write an algorithm that runs in O(n) time and uses O(1) extra space.