Algorithms Find the smallest number with given number of digits and sum of digits We are given two positive integers M and N. The task is to find the smallest number that has length M (number of digits) and sum of digits as N. We will solve this using a greedy approach in O(M)