- Find the maximum and minimum element in an array.
- Reverse an array.
- Check if an array is sorted.
- Remove duplicates from a sorted array.
- Find the index of a given element in an array (Linear Search).
- Rotate an array by k steps.
- Find the second largest element in an array.
- Move all zeros to the end of an array.
- Find the first non-repeating character in a string.
- Check if two strings are anagrams.
- Find the majority element in an array (appears more than n/2 times).
- Trapping Rain Water problem.
- Longest Substring Without Repeating Characters.
- Merge two sorted arrays without extra space.
- Find the median of two sorted arrays.
- Implement Bubble Sort.
- Implement Selection Sort.
- Implement Insertion Sort.
- Search for an element in a sorted array (Binary Search).
- Find the first and last position of an element in a sorted array.
- Implement Merge Sort.
- Implement Quick Sort.
- Find the kth largest element in an array.
- Find the smallest missing positive integer.
- Search in a rotated sorted array.
- Count inversions in an array (using Merge Sort).
- Find the median of a stream of integers.
- Allocate minimum number of pages (Binary Search application).
- Find the peak element in an array.
- Find the square root of a number using Binary Search.
- Reverse a linked list.
- Find the middle element of a linked list.
- Detect a cycle in a linked list.
- Remove duplicates from a sorted linked list.
- Merge two sorted linked lists.
- Remove the nth node from the end of a linked list.
- Add two numbers represented by linked lists.
- Check if a linked list is a palindrome.
- Intersection of two linked lists.
- Flatten a multilevel doubly linked list.
- Reverse a linked list in groups of k.
- Clone a linked list with random pointers.
- LRU Cache implementation.
- Merge k sorted linked lists.
- Find the starting point of a cycle in a linked list.
- Implement a stack using arrays.
- Implement a queue using arrays.
- Check for balanced parentheses.
- Reverse a string using a stack.
- Implement a queue using two stacks.
- Next Greater Element (using a stack).
- Design a stack that supports getMin() in O(1) time.
- Implement a circular queue.
- Evaluate a postfix expression.
- Generate all valid parentheses combinations.
- Largest Rectangle in a Histogram.
- Implement a queue using a linked list.
- Solve the Tower of Hanoi problem using recursion.
- Find the next smaller element in an array.
- Implement a stack that supports getMin() and getMax() in O(1) time.
- Find the height of a binary tree.
- Check if two trees are identical.
- Inorder, Preorder, and Postorder traversals.
- Find the maximum depth of a binary tree.
- Check if a binary tree is symmetric.
- Construct a binary tree from inorder and preorder traversals.
- Validate a Binary Search Tree (BST).
- Find the lowest common ancestor (LCA) of two nodes in a BST.
- Convert a sorted array to a balanced BST.
- Find the kth smallest element in a BST.
- Serialize and deserialize a binary tree.
- Flatten a binary tree to a linked list.
- Find the diameter of a binary tree.
- Count the number of unique BSTs with n nodes.
- Recover a BST with two nodes swapped.
- Implement Depth-First Search (DFS) on a graph.
- Implement Breadth-First Search (BFS) on a graph.
- Find the number of islands in a grid.
- Fibonacci sequence using recursion and dynamic programming.
- Climbing stairs problem (DP).
- Detect a cycle in a directed graph.
- Topological sorting of a graph.
- Longest Increasing Subsequence (LIS).
- Coin Change problem (DP).
- 0/1 Knapsack problem (DP).
- Dijkstra’s algorithm for shortest path.
- Find the shortest path in a maze (BFS).
- Longest Common Subsequence (LCS).
- Edit Distance problem (DP).
- Maximum sum subarray (Kadane’s Algorithm).
https://cses.fi/problemset/list/
https://github.com/golclinics/golclinics-dsa
https://www.youtube.com/playlist?list=PLhQjrBD2T381WAHyx1pq-sBfykqMBI7V4 => CS50 2024
https://www.youtube.com/watch?v=8hly31xKli0&t=15781s&pp=ygUeZGF0YSBzdHJ1Y3R1cmVzIGFuZCBhbGdvcml0aG1z
https://www.youtube.com/watch?v=lvO88XxNAzs&t=3298s&pp=ygUKZHNhIHRvcGljcw%3D%3D
https://www.youtube.com/playlist?list=PLBlnK6fEyqRj9lld8sWIUNwlKfdUoPd1Y