Longest Consecutive Subsequence
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 […]
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 […]
Given the integers zero, one, low, and high, we can construct a string by starting with an empty string, and then at each step
Given two arrays a[] and b[],the task is to find the number of elements in the union between these two arrays. The Union of
You are given a list of strings of the same length words and a string target. Your task is to form target using the given words under the
Efficient computation of subarray sums is a common problem in programming. One effective approach is the two-pointer technique, which allows
Given two integer arrays a[] and b[], you have to find the intersection of the two arrays. Intersection of two arrays is said to be elements that are
Given an integer array nums and an integer k, find three non-overlapping subarrays of length k with maximum sum and return them. Return the result
You are given an integer array nums and an integer target. You want to build an expression out of nums by adding one of the
Given an array arr[] of positive integers and another integer target. Determine if there exists two distinct indices such that the sum of
There exist two undirected trees with n and m nodes, numbered from 0 to n – 1 and from 0 to m – 1, respectively. You are given two 2D integer arrays edges1 and edges2 of lengths n
Given a strictly sorted 2D matrix mat[][] of size n x m anda number x. Find whether the number x is present in the matrix or not.Note:
You are given a 0-indexed array heights of positive integers, where heights[i] represents the height of the ith building. If a person is in building i, they can move