Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1537. Get the Maximum Score
Given two sorted arrays of distinct integers, find the maximum sum obtainable by traversing left-to-right along either array and optionally switching arrays at common elements; at each intersection you may choose the path with the larger accumulated prefix sum. Input sizes up to 1e5 and result must be returned modulo 1e9+7, so a linear two-pointer/merge-like approach is required.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.