Problem · Array
Find Largest Number (Google Early Career)
Learn this problemProblem statement
You are given an array of decimal digits with length at least 3. Choose three elements while preserving their original left-to-right order and concatenate them into a three-digit integer.
Return the largest integer that can be formed. The visible example establishes the order-preserving requirement: from [7,4,3,8,2], the answer is 782.
Function
findLargestNumber(nums: int[]) → intExamples
Example 1
nums = [7, 4, 3, 8, 2]return = 782🐹🐹
Constraints
3 <= nums.length <= 10^50 <= nums[i] <= 9
More Google problems
- Deduplicate Logs: Keep FirstONSITE INTERVIEW · Seen Jul 2026
- Deduplicate Logs: Keep LatestONSITE INTERVIEW · Seen Jul 2026
- Find a Template Across Binary-Tree LeavesONSITE INTERVIEW · Seen Jul 2026
- Maximum Programmer-Problem MatchingONSITE INTERVIEW · Seen Jul 2026
- Minimum Direction ViolationsONSITE INTERVIEW · Seen Jul 2026
- Stream Latest Log VersionsONSITE INTERVIEW · Seen Jul 2026
- Stream Unique Logs in Timestamp OrderONSITE INTERVIEW · Seen Jul 2026
- Top-K IP Addresses from File RecordsONSITE INTERVIEW · Seen Jul 2026