Maximum Concurrent Active Loans
Updated
Problem statement
Each funded loan is active during a half-open time interval [start, end): the start time is included and the end time is excluded.
Given all loan intervals, return the maximum number of loans active at the same time.
Function
maxActiveLoans(loans: int[][]) → intExamples
Example 1
loans = [[1,5],[2,6],[4,8],[7,9]]return = 3At time 4, the first three loans are active simultaneously.
Constraints
1 <= loans.length <= 10^5- Every row has exactly two values
[start, end]. 0 <= start < end <= 10^9- A loan ending at time
tdoes not overlap a loan starting at timet.
More Tekion interview questions
- Peak Resource Usage Across Weighted IntervalsPHONE SCREEN · Seen Sep 2026
- Dungeon GamePHONE SCREEN · Seen Sep 2026
- IPOPHONE SCREEN · Seen Sep 2026
- Coin Game From The EndsPHONE SCREEN · Seen Sep 2026
- Open Lockers After Toggle PassesPHONE SCREEN · Seen Sep 2026
- Maximum Profit with at Most K TransactionsPHONE SCREEN · Seen Aug 2026
- Largest Rectangle in HistogramONSITE INTERVIEW · Seen Sep 2026
- Next Greater Element to the RightONSITE INTERVIEW · Seen Sep 2026
- Koko Eating BananasONSITE INTERVIEW · Seen Sep 2026
- Maximum Sum of a Unique-Element SubarrayONSITE INTERVIEW · Seen Jul 2026
Similar questions at other companies
- Merge IntervalsApple · OA · PHONE SCREEN · ONSITE INTERVIEWApple interview questions
- Merge Overlapping IntervalsAtlassian · PHONE SCREEN · ONSITE INTERVIEWAtlassian interview questions
- Peak Chat Load Across AgentsCresta · PHONE SCREENCresta interview questions
- Meeting Rooms IIeBay · PHONE SCREENeBay interview questions
- Meeting Rooms IIByteDance · PHONE SCREENByteDance interview questions
- Majority Labels over Audio IntervalsNooks · PHONE SCREEN
- Meeting Rooms IIUber · PHONE SCREENUber interview questions
- Merge IntervalsGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
- Merge Overlapping IntervalsFurtherAI · PHONE SCREEN
- Merge Overlapping IntervalsFox Corporation · PHONE SCREEN