Showing 3 of 19 questions
You are given a string and a set of queries. For each query, determine if a given substring can be rearranged to form a palindrome after replacing up to a certain number of its characters.
#1. Can Make Palindrome from Substring
You're given a list of numbers. By deleting a number, you earn its value, but you must also delete all numbers one less and one greater than it. Maximize the total earned value.
#2. Delete and Earn
Given a string, reorder its characters by repeatedly picking the smallest character, then the largest, and appending them to the result.
#3. Increasing Decreasing String