NeetCode #538LC-2542MediumHeap / Priority Queue
← Back to All Problems#538 · #2542 · Maximum Subsequence Score(最大子序列的分数)
📌 Problem Statement & Constraints
You are given two arrays
nums1 and nums2 of equal length, and an integer k. Choose k indices; the score is (sum of nums1 at those indices) * (minimum of nums2 at those indices). Return the maximum score. Constraints: 1 <= k <= nums1.length <= 10^5, 1 <= nums1[i], nums2[i] <= 10^5.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!