A collection of coding questions for practice and interview preparation.
- Find the maximum subarray sum (Kadane's Algorithm).
- Merge two sorted arrays.
- Find the duplicate number in an array.
- Check if a string is a palindrome.
- Find the first non-repeating character.
- Reverse words in a sentence.
- Reverse a linked list.
- Detect a cycle in a linked list.
- Merge two sorted linked lists.
- Inorder traversal of a binary tree.
- Check if a binary tree is balanced.
- Find the lowest common ancestor.
- Depth-first search (DFS).
- Breadth-first search (BFS).
- Detect a cycle in a directed graph.
- Fibonacci sequence (top-down and bottom-up).
- Coin change problem.
- Longest increasing subsequence.
- Implement a stack using queues`
- Design a LRU cache.
- Find the median of two sorted arrays.
Feel free to add solutions or more questions!`