logo

📚 Coding Interview Topic-Wise Questions

1. Arrays & Strings
- Find duplicates in an array
- Two sum / Pair with given sum
- Reverse a string / Check palindrome
- Merge sorted arrays
- Rotate array by k steps

2. Linked Lists
- Reverse a linked list
- Detect cycle in linked list
- Merge two sorted linked lists
- Find middle node
- Remove nth node from end

3. Stacks & Queues
- Implement stack using arrays
- Valid parentheses check
- Next greater element
- Implement queue using stacks
- Circular queue design

4. Trees & Graphs
- Inorder, preorder, postorder traversal
- Level order traversal (BFS)
- Lowest common ancestor
- Check if binary tree is balanced
- Detect cycle in graph (DFS & BFS)

5. Hash Maps & Sets
- Two sum with hashmap
- Group anagrams
- Subarray with given sum
- Longest substring without repeating characters
- Check for duplicates

6. Recursion & Backtracking
- Generate all subsets
- Permutations of a string/array
- N-Queens problem
- Sudoku solver
- Combination sum

7. Sorting & Searching
- Binary search
- Merge sort / Quick sort implementation
- Find peak element
- Search in rotated sorted array
- Kth largest element in array

8. Dynamic Programming
- Fibonacci sequence
- Climbing stairs
- Coin change problem
- Longest increasing subsequence
- 0/1 Knapsack problem

---
💡 Bonus Tips:
- Always try brute force first, then optimize.
- Practice coding on a whiteboard or paper to simulate interviews.
- Explain your thought process aloud.



Source:Whatsapp channel;(Coding Interview - Python, Java, Programming, Al Tools & Tech News)

8
78 views