Search⌘ K
AI Features

Find Subsequence of Length K with the Largest Sum

Find Subsequence of Length K with the Largest Sum asks you to choose a subsequence of exactly k elements from an integer array and return the one with the greatest sum while preserving order.

Statement

You are given an integer array nums and an integer k ...