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
- 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
- Minimum Cars for Rental RequestsONSITE INTERVIEW · Seen Apr 2026
- Shortest Path with Mandatory WaypointONSITE INTERVIEW · Seen Apr 2026
- Count Divisible Coin SelectionsOA · Seen Dec 2025
public int buildMaximumInteger(int[] nums, int k) {
// write your code here
}
nums[4, 9, 0, 2]
k2
expected92
sign in to submit