Given N numbers and a length M, list every length-M sequence drawn from the numbers, allowing repeats, in increasing lexicographic order without duplicates.
Medium4BacktrackingRecursionSortingBrute forceInterviewNo attempts yetTime limit1sMemory limit512 MB