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.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.