Commonly Asked Coding Questions in DSA for Service-Based Companies
1. Find the largest sum subarray (Kadane's Algorithm)
2. Reverse a linked list
3. Find the middle element of a linked list
4. Implement a stack using queues
5. Implement a queue using two stacks
6. Merge two sorted arrays
7. Find if a number is prime
8. Find the nth Fibonacci number (Dynamic Programming)
9. Detect a cycle in a linked list
10. Sort an array using quicksort
11. Sort an array using mergesort
12. Find the kth smallest/largest element in an array
13. Find the intersection of two arrays
14. Find the longest common subsequence (LCS)
15. Find the minimum number of coins required to make change (Dynamic Programming)
16. Find the number of paths in a maze (Dynamic Programming)
17. Implement depth-first search (DFS) and breadth-first search (BFS)
18. Find the shortest path in an unweighted graph (BFS)
19. Find the longest increasing subsequence
20. Check if a binary tree is balanced