Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3627. Maximum Median Sum of Subsequences of Size 3
Partition the array into n/3 triplets and maximize the sum of their medians; the key insight is that after sorting you can greedily choose the k = n/3 medians by taking every second element starting from index k (indices k, k+2, …, 3k-2).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.