The question is to build an integer which is maximum from a subarray of size k.
For example, given an array [4, 9, 0, 2] and k = 2, the answer is 92.
Examples
01 · Example 1
nums = [4, 9, 0, 2] k = 2 return = 92
N/A for now 🥹
Constraints
🍉🍉More Google problems
- Periodic Table Word FormationsPHONE SCREEN · Seen Jun 2026
- Split and Sort ArraySeen Jun 2026
- Fountain SafetyONSITE INTERVIEW · Seen Jun 2026
- Consolidate On-Call RotationsOA · Seen Jun 2026
- Detonate Bombs with Chain ReactionsONSITE INTERVIEW · Seen May 2026
- Evaluate a Nested Math ExpressionONSITE INTERVIEW · Seen May 2026
- Tic-Tac-Toe Game StatusPHONE SCREEN · Seen May 2026
- Longest Dictionary TokenizationPHONE SCREEN · Seen May 2026
public int buildMaximumInteger(int[] nums, int k) {
// write your code here
}
nums[4, 9, 0, 2]
k2
expected92
checking account