Company: Deshaw full time_15march
Difficulty: medium
In a space colony, every habitation pod has a unique ID number ranging from minPod to maxPod . Each pod is assigned a "Resource Code" equal to the sum of the digits of its ID. For example, pod number 10 has a code of 1+0 = 1. Water is distributed to all pods sharing a specific Resource Code. To maximize the impact, the colony administrators want to target the Resource Code(s) that are assigned to the maximum number of pods. Your task is to count the number of resource codes that will receive water and how many pods will receive water in this optimal distribution. Example minPod = 1 maxPod = 10 Pod numbers range from 1 to 10 and their corresponding resource codes (the sum of their digits) are [1, 2, 3, 4, 5, 6, 7, 8, 9, 1]. For the 8 resource codes 2 to 9, each has 1 pod. For resource code 1, there are 2 pods, pod 1 and pod 10 (1 + 0 = 1). There is one way to have more pods receiving water. The answer is [1, 2] Function Description Complete the function waysToDistributeResources in the