Search⌘ K
AI Features

Get the Maximum Score

Get the Maximum Score compares two sorted arrays: traverse from the start of either one, optionally switch at shared values, and maximize the sum of unique values, returning it modulo a large prime.

Statement

You are given two sorted arrays of distinct integers, nums1 and nums2. ...