1408. String Matching in an Array
Given an array of string words, return all strings in words that is a substring of another word. You can return the answer in any order. A substring is […]
Given an array of string words, return all strings in words that is a substring of another word. You can return the answer in any order. A substring is […]
You are given an integer target and an array arr[]. You have to find number of pairs in arr[] which sums up to target. It is
You have n boxes. You are given a binary string boxes of length n, where boxes[i] is ‘0’ if the ith box is empty, and ‘1’ if it contains one ball. In one operation, you can
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.