Given N distinct numbers and a length M, print every length-M sequence drawn from the numbers with repetition allowed, deduplicated and in increasing lexicographic order.
Medium4BacktrackingRecursionSortingBrute forceInterviewNo attempts yetTime limit1sMemory limit512 MB