
800+ Data Structures and Algorithms
Practice Problems:
Array
1. Find pair with given sum in the array
2. Check if subarray with 0 sum is exists or not
3. Print all sub-arrays with 0 sum
4. Sort binary array in linear time
5. Find a duplicate element in a limited range array
6. Find maximum length sub-array having given sum
7. Find maximum length sub-array having equal number of 0’s and 1’s
8. Find maximum product of two integers in an array
9. Sort an array containing 0’s, 1’s and 2’s (Dutch National Flag Problem)
10. In place merge two sorted arrays
11. Merge two arrays by satisfying given constraints
12. Find index of 0 to replace to get maximum length sequence of continuous ones
13. Shuffle a given array of elements (Fisher–Yates shuffle)
14. Rearrange the array with alternate high and low elements
15. Find equilibrium index of an array
16. Find largest sub-array formed by consecutive integers
17. Find majority element (Boyer–Moore Majority Vote Algorithm)
18. Move all zeros present in the array to the end
19. Replace each element of array with product of every other element without using /
operator
20. Find Longest Bitonic Subarray in an array
21. Longest Increasing Subsequence