756. The Leap Code
Martin's professor taught him about gray codes, hamming, and unit distances. He also introduced him to a similar concept called Leap codes.
A Leap code is a number in which all adjacent digits differ by 1. For example, 3456 and 9878 are Leap codes.It is known that all single-digit numbers are Leap codes. Given a number N, find all the Leap codes that are less than or equal to N.