Showing 3 questions
Find two numbers in a given array that add up to a specific target value, and return their indices. Essentially, you need to efficiently locate the pair that satisfies the sum requirement.
#1. Two Sum
Given a string, find the most frequent character that appears earliest in the string. Return the length of the shortest substring that contains all occurrences of this character.
#2. Reverse Degree of a String
Given a sorted array, remove the duplicate elements in-place such that each unique element appears only once. Return the new length of the array.
#3. Remove Duplicates from Sorted Array