Search
⌘K

Leetcode 2576. Find the Maximum Number of Marked Indices

Given an integer array, repeatedly pair up distinct unmarked indices (i, j) with 2 * nums[i] <= nums[j] and mark both; return the maximum number of indices that can be marked. Equivalently, find the largest number of disjoint pairs where the smaller element is at most half the larger (n up to 1e5).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.