3447 Clear Digits
Clear Digits You are given a string s. Your task is to remove all digits by doing this operation repeatedly: Delete the *first* digit and the **closest** **non-digit** character to its *left*. ...
Clear Digits You are given a string s. Your task is to remove all digits by doing this operation repeatedly: Delete the *first* digit and the **closest** **non-digit** character to its *left*. ...
Count Number of Bad Pairs You are given a 0-indexed integer array nums. A pair of indices (i, j) is a bad pair if i < j and j - i != nums[j] - nums[i]. Return* the total number of bad pairs i...
Design a Number Container System Design a number container system that can do the following: **Insert **or **Replace** a number at the given index in the system. **Return **the smallest index fo...
Find the Number of Distinct Colors Among the Balls You are given an integer limit and a 2D array queries of size n x 2. There are limit + 1 balls with distinct labels in the range [0, limit]. In...
Tuple with Same Product Given an array nums of distinct positive integers, return the number of tuples *(a, b, c, d) such that a * b = c * d where a, b, c, and d are elements of nums, and a != b ...
Check if One String Swap Can Make Strings Equal You are given two strings s1 and s2 of equal length. A string swap is an operation where you choose two indices in a string (not necessarily differ...
Maximum Ascending Subarray Sum Given an array of positive integers nums, return the *maximum possible sum of an ascending subarray in *nums. A subarray is defined as a contiguous sequence of num...
Longest Strictly Increasing or Strictly Decreasing Subarray You are given an array of integers nums. Return the length of the longest subarray of *nums which is either strictly increasing or stri...
Check if Array Is Sorted and Rotated Given an array nums, return true* if the array was originally sorted in non-decreasing order, then rotated some number of positions (including zero)*. Otherwi...
Special Array I An array is considered special if every pair of its adjacent elements contains two numbers with different parity. You are given an array of integers nums. Return true if nums is ...