Question | Code |
---|---|
Reverse an Array/String | Code |
Find the maximum and minimum element in an array | Code |
Find the “Kth” max and min element of an array | Code |
Given an array which consists of only 0, 1 and 2. Sort the array without using any sorting algo | Code |
Move all the negative elements to one side of the array | Code |
Find the Union and Intersection of the two sorted arrays. | Code |
Write a program to cyclically rotate an array by one. | Code |
Find Largest sum contiguous Subarray [V. IMP] | Code |
Minimize the maximum difference between heights [V.IMP] | Code |
Minimum no. of Jumps to reach end of an array | Code |
Find duplicate in an array of N+1 Integers | Code |
Merge 2 sorted arrays without using Extra space. | Code |
Kadane’s Algo [V.V.V.V.V IMP] | Code |
Merge Intervals | Code |
Next Permutation | Code |
Count Inversion | Code |
Best time to buy and Sell stock | Code |
Find all pairs on integer array whose sum is equal to given number | Code |
Find common elements In 3 sorted arrays | Code |
Rearrange the array in alternating positive and negative items with O(1) extra space | Code |
Find if there is any subarray with sum equal to 0 | Code |
Find factorial of a large number | Code |
Find maximum product subarray | Code |
Find longest consecutive subsequence | Code |
Given an array of size n and a number k, fin all elements that appear more than ” n/k ” times. | Code |
Maximum profit by buying and selling a share at most twice | Code |
Find whether an array is a subset of another array | Code |
Find the triplet that sum to a given value | Code |
Trapping Rain water problem | Code |
Chocolate Distribution problem | Code |
Smallest Subarray with sum greater than a given value | Code |
Three way partitioning of an array around a given value | Code |
Minimum swaps required bring elements less equal K together | Code |
Minimum no. of operations required to make an array palindrome | Code |
Median of 2 sorted arrays of equal size | Code |
Median of 2 sorted arrays of different size | Code |
Question | Code |
---|---|
Spiral traversal on a Matrix | Code |
Search an element in a Matrix | Code |
Find median in a row wise sorted matrix | Code |
Find row with maximum no. of 1’s | Code |
Print elements in sorted order using row-column wise sorted matrix | Code |
Maximum size rectangle | Code |
Find a specific pair in matrix | Code |
Rotate matrix by 90 degrees | Code |
Kth smallest element in a row-column wise sorted matrix | Code |
Common elements in all rows of a given matrix | Code |