Most frequent Interview ask Question on Array
Interview Questions
1. Kadaneβs Algorithm & Subarray Sumsβ
- π Kadane's Algorithm (GFG)
- π Maximum Product Subarray (LeetCode)
- π Maximum Sum Circular Subarray (LeetCode)
- π Number of Subarrays With Average β₯ Threshold (LeetCode)
- π Best Time to Buy and Sell Stock (LeetCode)
2. Prefix / Running Sum / Range Queriesβ
- π Range Sum Query - Immutable (LeetCode)
- π Running Sum of 1D Array (LeetCode)
- π Find Pivot Index (LeetCode)
3. Frequency Array / Hashingβ
- π First Element Occurring K Times (GFG)
- π Friends of Appropriate Ages (LeetCode)
- π Majority Element - Voting Algo (LeetCode)
- π Find All Duplicates in an Array (LeetCode)
- π Find All Numbers Disappeared in Array (LeetCode)
4. Two-Pointer & Sliding Windowβ
- π Two Sum (LeetCode)
- π Two Sum II - Sorted Input (LeetCode)
- π 3Sum (LeetCode)
- π 4Sum (LeetCode)
- π Container With Most Water (LeetCode)
5. Rearrangement / Transformationβ
- π Sort Colors (LeetCode)
- π Move Zeroes (LeetCode)
- π Rotate Array (LeetCode)
- π Rearrange Array Elements by Sign (LeetCode)
- π Next Permutation (LeetCode)
(Imp) - π Set Matrix Zeroes (LeetCode)
6. Matrix & 2D Arraysβ
- π Leaders in an Array (GFG)
- π Rotate Image / Matrix (LeetCode)
- π Maximal Rectangle (LeetCode)
- π Queries on a Matrix (GFG)
7. Special Problems on Difference, Union, Distanceβ
- π Max Distance Between Same Elements (GFG)
- π Maximum Difference Between Two Elements (GFG)
- π In First but Not Second (GFG)
- π Union of Two Sorted Arrays (GFG)
8. Pascal Triangle & Pattern Matrixβ
9. Tricky/Unique Questionsβ
- π Trapping Rain Water (LeetCode)
- π Greatest Sum Divisible by Three (LeetCode)
- π First Missing Positive (LeetCode)
- π Missing Number (LeetCode)
10. String + Array Hybrid Problemsβ
- π Valid Palindrome II (LeetCode)
- π Zigzag Conversion (LeetCode)
- π Longest Distinct Characters in String (GFG)
- π CSES - Repetitions
11. Extras / Mixed Conceptsβ
β¨ Tip: Focus more on tagged problems like Kadane's, Sliding Window, Prefix Sums, Rearrangement, Matrix Transforms & Voting Algo. These are asked repeatedly in FAANG-level interviews.