EasyFind all triplets with zero sumThe problem “Find all triplets with zero sum” states that you are given an array read more
MediumGenerate all possible sorted arrays from alternate elements of two given sorted arraysThe problem “Generate all possible sorted arrays from alternate elements of two given sorted read more
MediumArray Queries for multiply, replacements and productThe problem “Array Queries for multiply, replacements and product” states that you are read more
EasyCheck in binary array the number represented by a subarray is odd or evenThe problem “Check in binary array the number represented by a subarray is odd or even” read more
MediumQueries for counts of array elements with values in given rangeProblem Statement The problem “Queries for counts of array elements with values in given read more
MediumProducts of ranges in an arrayProblem Statement The problem “Products of ranges in an array” states that you are read more
EasyPalindrome PermutationProblem Statement The problem “Palindrome Permutation” states that you are given a read more
MediumSort an array according to the order defined by another arrayProblem Statement You are given two arrays of integers arr1[] and arr2[]. The problem “Sort read more
EasyRearrange a binary string as alternate x and y occurrencesProblem Statement Suppose you are given a binary string, and two numbers x and y. The string read more
EasyShuffle 2n integers as a1-b1-a2-b2-a3-b3-..bn without using extra spaceProblem Statement You are given an array of integers. The problem “Shuffle 2n integers as read more
EasyDistinct adjacent elements in an arrayProblem Statement Suppose we have an integer array. The problem “Distinct adjacent elements read more
MediumConstruction of Longest Increasing Subsequence (N log N)Problem Statement You are given an array of integers. The problem “Construction of Longest read more
EasyMaximize sum of consecutive differences in a circular arrayProblem Statement Suppose you have an integer array. This array should be treated as a circular read more
EasyThree way partitioning of an array around a given rangeProblem Statement You are given an array of integers and a range of lowValue and highValue. The read more
EasyCheck if X can give change to every person in the QueueProblem Statement X is an ice cream seller and there are n people waiting in a queue to buy an ice read more
EasyRearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’Problem Statement The problem ” Rearrange an array such that ‘arr[j]’ becomes ‘i’ if read more
EasyMaximum length subsequence with difference between adjacent elements as either 0 or 1Problem Statement You are given an integer array. The problem “Maximum length subsequence read more
EasyReplace two consecutive equal values with one greaterProblem Statement Suppose you have an integer array. The problem “Replace two consecutive read more
EasyFind a sorted subsequence of size 3 in linear timeProblem Statement The problem “Find a sorted subsequence of size 3 in linear time” read more
EasyMaximum Product SubarrayProblem Statement The problem “Maximum Product Subarray” states that you are given an read more
EasyConvert array into Zig-Zag fashionProblem Statement The problem “Convert array into Zig-Zag fashion” states that you are read more
EasyRearrange array such that even index elements are smaller and odd index elements are greaterProblem Statement You have given an array of integers. The problem “Rearrange array such that read more
EasySegregate even and odd numbersProblem Statement Suppose you have an integer array. The problem “Segregate even and odd read more
MediumFind Minimum In Rotated Sorted ArrayProblem Statement “Find Minimum In Rotated Sorted Array” states that you are given a read more
EasyMove all negative elements to end in order with extra space allowedProblem Statement “Move all negative elements to end in order with extra space allowed” read more
EasyRearrange array such that even positioned are greater than oddProblem Statement Suppose you have an integer array. The problem “Rearrange array such that read more
EasyDouble the first element and move zero to endProblem Statement Suppose you have an array of integers. Here “0” is not a number which is read more
EasyRemove duplicates from sorted arrayProblem Statement “Remove duplicates from sorted array” states that you are given a read more
EasyProduct of array except selfProblem Statement “Product of array except self” problem, states that you are given an read more
MediumFirst missing positiveProblem Statement “First missing positive” problem states that you are given an array read more
MediumContiguous Array LeetcodeProblem Statement “Contiguous Array Leetcode” problem states that you are given an read more
EasyFind the minimum distance between two numbersProblem Statement You have given an array and two numbers called x and y. The problem “Find read more
MediumCount pairs from two sorted arrays whose sum is equal to a given value xProblem Statement “Count pairs from two sorted arrays whose sum is equal to a given value read more
EasyFind the subarray with least averageProblem Statement You have given an integer array and a number k. The problem statement asks to read more
MediumFind the smallest positive integer value that cannot be represented as sum of any subset of a given arrayProblem Statement You are given a sorted array of integers. We need to find the smallest positive read more
EasyFind minimum number of merge operations to make an array palindromeProblem Statement You are given an array of integers. The problem statement asks to find minimum read more
MediumMinimize the maximum difference between the heightsProblem Statement You are given some heights of n towers and a number k. We can either increase the read more
EasyFind maximum average subarray of k lengthProblem Statement You are given an array of integers and a number k. The problem statement asks to read more
EasyFind minimum difference between any two elementsProblem Statement You are given an array of integers. The problem statement asks to find minimum read more
EasyCount minimum steps to get the given desired arrayProblem Statement Suppose you have an array containing only integer 0 as all of its elements. read more
Subset LeetcodeIn Subset Leetcode problem we have given a set of distinct integers, nums, print all subsets (the read more
Dividing Array into Pairs With Sum Divisible by KThe dividing array into pairs with sum divisible by K is a problem which is asked in interviews read more
Count Distinct Elements in Every Window of Size KSubsets are something which we have been dealing with for some time now. In the last episode, we read more
Count Subsets Having Distinct Even NumbersWe have all struggled with the subset problem at some point or the other in an interview. The read more
Find Three Element From Different Three Arrays Such That a + b + c = sumThree Sum is a problem loved by interviewers. It is a problem I was personally asked during the read more
Longest Increasing SubsequenceWe are provided with an array of integers that is unsorted and we have to find the longest read more
Count Pairs Whose Products Exist in ArrayIn count pairs whose products exist in array problem we have given an array, count all the distinct read more
Merge Overlapping IntervalsIn merge overlapping intervals problem we have given a collection of intervals, merge and return read more
Median of Two Sorted ArraysGiven two sorted arrays A and B of size n and m respectively. Find the median of the final sorted read more
Maximum Product SubarrayIn the maximum product subarray problem, we have given an array of integers, find the contiguous read more
Find Maximum of Minimum for Every Window Size in a Given ArrayGiven an array a[ ] of size n. For every window size that varies from 1 to n in array print or find read more
Minimum Size Subarray SumGiven an array nums of a positive integer and a sum s, find the minimum size of a contiguous read more
Intersection of Two ArraysIn intersection of two arrays problem, we have given two arrays, we need to print their read more
Leetcode PermutationsIn this leetcode problem premutation we have given an array of distinct integers, print all of its read more
Search an Element in Sorted Rotated ArrayIn search in sorted rotated array problem we have given a sorted and rotated array and an element, read more
Maximum Product SubarrayGiven an array of n integers, find the maximum product obtained from a contiguous subarray of the read more
3 SumIn 3 Sum problem, we have given an array nums of n integers, find all the unique triplets that sum read more
Find The Duplicate NumberGiven an array nums containing (n + 1) elements and every element is between 1 to n. If there is read more
Maximum Sum of 3 Non-Overlapping SubarraysIn the maximum sum of 3 non-overlapping subarrays problem we have given an array nums of positive read more
Minimum Index Sum of Two ListsAnkur and Rishabh are two friends and want to buy some fruits from the market. They both have a read more
Split Array Into Consecutive SubsequencesGiven a sorted array(in ascending order), check if the array can be split into 1 or more read more
Find the Duplicate ElementGiven an array of integers of size n+1 where each element of the array is between 1 and n read more
Find the Only Repetitive Element Between 1 to N-1In finding the only repetitive element between 1 to N-1 problem we have given an array of random read more
Trapping Rain WaterIn Trapping Rain Water problem we have given N non-negative integers representing an elevation map read more
Finding K closest elementIn Finding K closest element problem we have given a sorted array and a value x. The problem is to read more
Jump GameIn jump game we have given an array of non-negative integers, you are initially positioned at the read more
Combination SumIn combination sum problem we have given an array of positive integers arr[] and a sum s, find all read more
Search in Sorted Rotated ArrayAn element search in sorted rotated array can be found using binary search in O(logn) time. The read more
Maximum SubarrayIn the Maximum Subarray problem we have given an integer array nums, find the contiguous sub array read more
Sliding Window MaximumIn Sliding Window Maximum problem we have given an array nums, for each contiguous window of size read more
Delete And EarnIn delete and earn problem we have given an array nums, you may perform the following operation on read more
Length of Longest Fibonacci SubsequenceGiven a strictly increasing array of positive integers, find the length of the longest fibonacci read more
Merging IntervalsIn merging intervals problem we have given a set of intervals of the form [l, r], merge the read more
First Bad VersionWe all have heard the saying “Bad Apple Ruins The Bunch”.First Bad Version is a problem read more
Peak Index in a Mountain ArrayWhat is Peak Index in a Mountain Array Problem? An array can be said as a Mountain Array if it read more
4SumIn the 4Sum problem, we have given an integer x and an array a[ ] of size n. Find all the unique read more
Create Maximum NumberIn the Create Maximum Number problem, we have given two arrays of length n and m with digits 0-9 read more
Degree of an arrayProblem Statement In the Degree of an array problem we have given a non-empty array of non-negative read more
Queue Reconstruction by HeightProblem Description of Queue Reconstruction by Height Suppose you have a random list of people read more
Search Insert PositionIn the Search Insert Position problem, we have given an integer x and a sorted array a[ ] of size read more
Find Peak ElementLet’s understand Find Peak Element problem. Today we have with us an array that needs its read more
Valid Triangle NumberProblem In the Valid Triangle Number problem, we have given an array of non-negative integers. read more
Power of TwoIn Power of Two problem we have given an integer, check if it is the power of 2 or not. A number in read more
Stone Game LeetCodeWhat is Stone Game problem? Stone Game LeetCode – Two players A and B are playing a stone read more
Maximum size subarray sum equals kIn Maximum size subarray sum equals k we have given an array of integers and a value k. You have to read more
Next greater elementThe next greater element is a problem in which we have given an array. This array containing N read more
Guess The WordGuess The Word is an interactive problem. An interactive problem means the data which is given to read more
Missing NumberIn Missing Number problem we have given an array of size N containing a number from 0 to N. All the read more
Merge Sorted ArrayIn merge sorted array problem we have given two sorted arrays in increasing order. In input first, read more
Partition Equal Subset SumPartition Equal Subset Sum is a problem in which we have given an array of positive numbers. We read more
Last Stone WeightLast Stone Weight is a problem in which we have a set of stones having some positive weights. Now read more
Sort ColorsSort colors is a problem in which we have to given an array containing N objects. Each box is read more
Rotate ArrayRotate array is a problem in which we have given an array of size N. We have to rotate the array in read more
Subarray Sum Equals kGiven an integer array and an integer k. Find total number of contiguous subarrays of given array read more
Infix to PostfixWhat is an infix expression? Expression in the form of ‘operand’ ‘operator’ ‘operand’ read more
Circular QueueA circular queue is an advanced form of a linear queue. In the linear queue, we can’t insert an read more
Given a sorted array and a number x, find the pair in array whose sum is closest to xALGORITHM TIME COMPLEXITY: O(N) SPACE COMPLEXITY: O(1) 1. We initialize two pointer like variable read more
Find the subarray whose sum is equal to a given number XExample INPUT 7, 3, 18, 2  and given number X = 23 OUTPUT SUBARRAY IS 3, 18, 2 whose sum is 23 read more
Arrange Even and Odd number such that Odd comes after EvenINPUT: 7  2  4  9  10  11  13  27 OUTPUT: 10  2  4  9  7  11  13  27 ALGORITHM TIME read more
Minimum number of Merge Operations to make an Array PalindromeIf it is not a palindrome it will make merge operations and prints the number of merge operations. read more