This is a verified interview question from Google. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Power Sequence Data Compression" covers key patterns like DP.
"A data analytics company is processing large streams of numerical sensor readings. To reduce storage costs, they aim to identify structured groups of values that exhibit multiplicative progression patterns within the ordered set of readings. You are given an array A of N positive integers representing sensor readings, and an integer K representing the maximum number of multiplicative steps to attempt. Consider only the distinct values in the array along with their frequencies. Sort these distinct values in strictly increasing order. Let this list be: vals[0], vals[1], ..., vals[M-1] Let freq[x] denote the number of occurrences of value x in the original array. ### Problem ### Input - The first line contains an integer N, the number of sensor readings. - The second line contains an integer K, the maximum number of multiplicative steps. - The third line contains N space-separated integers representing the sensor readings A. ### Output - Print a single integer representing the maximum score achievable. ### Constraints - 2 <= N <= 100000 - 1 <= K <= 20 - 1 <= A[i] <= 10^18 - At least one element of A is greater than 1 The task is to find the maximum score achievable by identifying structured groups of values that exhibit multiplicative progression patterns within the ordered set of readings."
Join thousands of developers practicing for Google.