DATA STRUCTURE-ARRAYS
In this blog, we will discuss the best 36 questions of the array.
Firstly we need to know, What is an array? Let's go into it and know about it.
An array is a homogeneous collection of elements and stored sequentially in memory. An array is a data structure that holds a similar type of element.
QUESTIONS
Q1. Reverse the array.
Q2. Find the maximum and minimum elements in an array.
Q3. Find the "Kth" max and min element of an array.
Q4. Write a program to cyclically rotate an array by one.
Q5. Find the union and intersection of two sorted arrays.
Q6. Move all the negatives elements to one side of the array.
Q7. find Largest sum contiguous Subarray.
Q8. Minimize the maximum difference between heights.
Q9. Minimum no. of Jumps to reach the end of an array.
Q10. find duplicate in an array of N+1 Integers
Q11. Merge Intervals
Q12. Next Permutation
Q13. Count Inversion
Q14. Merge 2 sorted arrays without using Extra space.
Q15. Kadane's Algo.
Q16. Best time to buy and sell stock
Q17. Find all pairs on integer array whose sum is equal to the given number
Q18. Find common elements In 3 sorted arrays
Q19. Rearrange the array in alternating positive and negative items with O(1) extra space
Q20. Find if there is any subarray with sum equal to 0
Q21. Find factorial of a large number
Q22. Find maximum product subarray
Q23. Find longest consecutive subsequence.
Q24.Given an array of size n and a number k, find all elements that appear more than " n/k " times.
Q25. Find whether an array is a subset of another array
Q26. Maximum profit by buying and selling a share at most twice.
Q27. Find the triplet that sums to a given value.
Q28. Trapping Rainwater problem
Q29. Chocolate Distribution problem
Q30. Smallest Subarray with sum greater than a given value
Q31. Three-way partitioning of an array around a given value
Q32. Minimum swaps required to bring elements less equal K together
Q33. Minimum no. of operations required to make an array palindrome
Q34. Median of 2 sorted arrays of equal size
Q35. Median of 2 sorted arrays of different sizes.
Q36. 2SUM,3SUM,4SUM
Thank You!
Keep Learning!
Share with your mates.
Follow us for more amazing content.
