1. Write a program to implement a binary search algorithm.
2. Write a program to find the longest palindromic substring in a string.
3. Write a program to implement a basic linked list.
4. Write a program to sort an array using quicksort.
5. Write a program to find the common elements in three sorted arrays.
6. Write a program to calculate the power of a number using binary exponentiation.
7. Write a program to implement a queue using two stacks.
8. Write a program to find the first missing positive integer in an array.
9. Write a program to merge two sorted linked lists.
10. Write a program to find the longest common subsequence of two strings.
11. Write a program to detect a cycle in a linked list.
12. Write a program to implement a basic stack.
13. Write a program to calculate the height of a binary tree.
14. Write a program to find all permutations of a string.
15. Write a program to validate a binary search tree.
16. Write a program to implement a simple hash table.
17. Write a program to count the number of islands in a 2D grid.
18. Write a program to solve the N-Queens problem.
19. Write a program to implement a basic binary tree.
20. Write a program to find the minimum path sum in a grid.
21. Write a program to reverse a linked list.
22. Write a program to find the shortest path in an unweighted graph using BFS.
23. Write a program to implement a simple calculator using recursion.
24. Write a program to find the longest increasing subsequence in an array.
25. Write a program to implement depth-first search (DFS) on a graph.
26. Write a program to find the Kth largest element in an array.
27. Write a program to check if a string has balanced parentheses.
28. Write a program to find the maximum sum of a contiguous subarray (Kadane’s Algorithm).
29. Write a program to implement the bubble sort algorithm.
30. Write a program to find all subsets of a set.
31. Write a program to implement a priority queue.
32. Write a program to calculate the median of two sorted arrays.
33. Write a program to flatten a nested list structure.
34. Write a program to find the intersection of two arrays.
35. Write a program to implement a simple Trie.
36. Write a program to find the longest substring with at most two distinct characters.
37. Write a program to implement a simple text editor with basic operations.
38. Write a program to perform a topological sort on a directed graph.
39. Write a program to find the duplicate number in an array.
40. Write a program to check if two strings are anagrams using character counts.