Sum Pair closest to target
Given an array arr[] and a number target, find a pair of elements (a, b) in arr[], where a<=b whose sum is closest to target.Note: Return the […]
Given an array arr[] and a number target, find a pair of elements (a, b) in arr[], where a<=b whose sum is closest to target.Note: Return the […]
You are given a string s of lowercase English letters and a 2D integer array shifts where shifts[i] = [starti, endi, directioni]. For every i, shift the characters
Given an array arr[] and an integer target. You have to find the number of pairs in the array whose sum is strictly less
Given a string s, return the number of unique palindromes of length three that are a subsequence of s. Note that even if there are multiple ways
Given a sorted array arr[] and a target value, the task is to count triplets (i, j, k) of valid indices, such that arr[i] + arr[j] +
You are given a 0-indexed integer array nums of length n. nums contains a valid split at index i if the following are true: The sum of the first i +
Given an array of integers arr[] and a number k, count the number of subarrays having XOR of their elements as k. Examples: Input: arr[] =
You are given a 0-indexed array of strings words and a 2D array of integers queries. Each query queries[i] = [li, ri] asks us to find the
Given an unsorted array of integers, find the number of continuous subarrays having sum exactly equal to a given number k.
Given a string s of zeros and ones, return the maximum score after splitting the string into two non-empty substrings (i.e. left substring and right substring). The score after splitting a
Given an array of strings, return all groups of strings that are anagrams. The groups must be created in order
You have planned some train traveling one year in advance. The days of the year in which you will travel