Trapping Rain Water
Given an array arr[] with non-negative integers representing the height of blocks. If the width of each block is 1, compute how […]
Given an array arr[] with non-negative integers representing the height of blocks. If the width of each block is 1, compute how […]
Given a string s, find the length of the longest substring with all distinct characters. Examples: Input: s = “geeksforgeeks” Output:
Given an array arr[] containing only non-negative integers, your task is to find a continuous subarray (a contiguous sequence of elements) whose
Given an integer array arr[]. Find the number of triangles that can be formed with three different array elements as lengths
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
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 an integer target. You have to find the number of pairs in the array whose sum is strictly less
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] +
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[] =
Given an unsorted array of integers, find the number of continuous subarrays having sum exactly equal to a given number k.
Given an array of strings, return all groups of strings that are anagrams. The groups must be created in order
Given an array arr[] of non-negative integers. Find the length of the longest sub-sequence such that elements in the subsequence are consecutive integers, the consecutive