← All problemsSign in

2542. Maximum Subsequence Score

LeetCodeArrayGreedySortingHeap (Priority Queue)Open on judge ↗

You are given two 0-indexed integer arrays nums1 and nums2 of equal length n and a positive integer k. You must choose a subsequence of indices from nums1 of length k. For chosen indices i0, i1, ..., ik - 1, your score is defined as: - The sum of the selected elements from nums1 multiplied with the minimum of the selected elements from nums2. - It can defined simply as: (nums1[i0] + nums1[i1] +

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start