Google · OA
In processGoogle 2024 New Grad OA: Biggest Number From Digits and Range-Increment Moves
Role: Software Engineer, New Grad
Result: OA completed
Report time: September 2024
The assessment contained two questions in 90 minutes and required candidates to write their own tests.
Question 1: biggest number from digits
Given a digit array, select at most three digits without changing their relative order and return the largest number that can be formed.
Example: [7,2,3,3,4,9] -> 749.
Practice: Biggest Number From Digits
Question 2: minimum range-increment moves
Start from an all-zero array. One move chooses any contiguous range and increments every value in that range by one. Given target array A, return the minimum moves needed to construct it.
Example: [0,0,0] -> [2,1,3] needs four moves:
[0,0,0] -> [1,1,1] -> [2,1,1] -> [2,1,2] -> [2,1,3].
Practice: Minimum Number of Moves to Obtain
No author reply clarified how many test cases were expected or whether test count affected scoring.
Comments
0No comments yet — be the first to share what you know.