You are given a nums.
Initially, all indices are unmarked. You can perform the following operation any number of times:
Pick two distinct unmarked indices i and j such that nums[i] nums[j].
Mark both index i and index j.
Return the maximum possible number of marked indices after performing the operation optimally.
Constraints:
nums.length
nums[i]
You are given a nums.
Initially, all indices are unmarked. You can perform the following operation any number of times:
Pick two distinct unmarked indices i and j such that nums[i] nums[j].
Mark both index i and index j.
Return the maximum possible number of marked indices after performing the operation optimally.
Constraints:
nums.length
nums[i]