Arrays:
Reverse an array.
Find the maximum (or minimum) element in an array.
Find the kth largest (or smallest) element in an array.
Rotate an array by k elements.
Find the majority element in an array.
Merge two sorted arrays.
Remove duplicates from a sorted array.
Find the intersection of two arrays.
Find the subarray with the maximum sum (Kadane's algorithm).
Implement an array-based data structure like a stack or queue.
Strings:
Reverse a string.
Check if a string is a palindrome.
Check if two strings are anagrams of each other.
Implement string compression.
Find the first non-repeating character in a string.
Implement strstr (substring search).
Check if a string contains only digits.
Count and Say problem.
Longest common prefix.
Implement Trie data structure.
Linked Lists:
Reverse a linked list.
Find the middle of a linked list.
Detect a cycle in a linked list.
Merge two sorted linked lists.
Remove Nth node from the end of a linked list.
Detect intersection point of two linked lists.
Implement a stack or queue using a linked list.
Check if a linked list is palindrome.
Add two numbers represented by linked lists.
Flatten a multilevel linked list.
Stacks and Queues:
Implement a stack using arrays or linked list.
Implement a queue using arrays or linked list.
Implement a min-stack (supporting push, pop, top, getMin in O(1) time).
Implement a queue using two stacks.
Implement a stack that supports push, pop, top, and retrieving the minimum element
in constant time.
Design a data structure that supports the following operations: insert, delete,
get_random_element.
Trees:
Tree traversals (preorder, inorder, postorder).
Check if a binary tree is balanced.
Check if a binary tree is symmetric.
Serialize and deserialize a binary tree.
Construct binary tree from inorder and preorder (or postorder) traversal.
Find the lowest common ancestor in a binary tree.
Find the diameter of a binary tree.
Check if a binary tree is a binary search tree.
Print all root-to-leaf paths in a binary tree.
Convert binary tree to its mirror/tree.
Graphs:
Implement graph traversal algorithms (DFS, BFS).
Detect cycle in a directed graph.
Detect cycle in an undirected graph.
Find the shortest path in a weighted graph (Dijkstra's algorithm).
Find the shortest path in an unweighted graph (BFS).
Find all connected components in an undirected graph.
Implement topological sort.
Check if a graph is bipartite.
Check if a path exists between two vertices.
Find the minimum spanning tree of a graph (Prim's or Kruskal's algorithm).
Dynamic Programming:
Fibonacci sequence (recursive and dynamic programming).
0/1 Knapsack problem.
Longest common subsequence.
Longest increasing subsequence.
Edit distance.
Coin change problem.
Rod cutting problem.
Matrix chain multiplication.
Subset sum problem.
Maximum subarray sum.