Company: Visa_6nov
Difficulty: medium
Sensor Readings Transformation Problem Description You are working with data collected from various sensors. Given an array of non-negative integers readings representing the sensor transforms, transform the array by repeatedly replacing each element with the sum of its digits. Continue this transformation until every element is a single digit. Return the most occurring digit in the final array. In case of a tie, return the highest digit. Note: You are not expected to provide the most optimal solution, but a solution with time complexity not worse than O(readings.length) will fit within the execution time limit. Examples Example 1: Input: readings = [123, 456, 789, 101] Output: 6 Explanation: The sum of digits for 123 is 1 + 2 + 3 = 6. The sum of digits for 456 is 4 + 5 + 6 = 15 and further reduced to 1 + 5 = 6. The sum of digits for 789 is 7 + 8 + 9 = 24 and further reduced to 2 + 4 = 6. The sum of digits for 101 is 1 + 0 + 1 = 2. The final transformed array is [6, 6, 6, 2] , with the