Showing 3 of 4 questions
Given an array of integers, count how many elements have a corresponding element that is exactly one greater. For example, if the array contains 1, 2, and 3, both 1 (because 2 is present) and 2 (because 3 is present) would be counted.
#1. Counting Elements
You are given a list of numbers, and you can delete pairs of numbers that have a difference of one. Your goal is to maximize the total sum of the numbers you keep after performing these deletions.
#2. Maximize Score After Pair Deletions
Find a subsequence of size k from a given array such that the sum of the subsequence's elements is even and maximized. Return the largest even sum achievable.
#3. Subsequence of Size K With the Largest Even Sum
Page 1 of 1 · 4 total