1. Find all pairs in an array that sum to a specific target and return their indices.
2. Given a sorted array, find the first and last position of a target value.
3. Find the longest substring with at most two distinct characters.
4. Merge two sorted linked lists into one sorted linked list.
5. Find the maximum sum of a subarray of size k in a circular array.
6. Implement a function to remove all duplicates from a sorted linked list.
7. Find the intersection of two linked lists.
8. Determine if a given string can be partitioned into valid substrings (e.g., IP address).
9. Check if a linked list has a cycle using two pointers.
10. Find the minimum window substring that contains all characters of another string.
11. Count the number of triplets in an array that sum up to zero.
12. Find the median of two sorted arrays.
13. Implement an algorithm to check if two strings are rotations of each other.
14. Find the longest palindromic substring in a string.
15. Calculate the maximum area of water that can be trapped between buildings.
16. Count the number of unique paths in a grid with obstacles.
17. Find the longest substring without repeating characters in a string.
18. Given two strings, find the length of their longest common subsequence.
19. Find the first pair of elements in an array that sum to a given value.
20. Implement a function to find the maximum product of any two integers in an array.
21. Determine if an array can be partitioned into two subsets with equal sum.
22. Find the longest increasing subsequence in an array.
23. Check if a string is a valid palindrome with special characters.
24. Merge k sorted linked lists into one sorted linked list.
25. Count the number of substrings of a given length that are palindromic.
26. Find the length of the longest substring with at most k distinct characters.
27. Check if an array contains duplicate elements within a given range.
28. Determine the number of valid parentheses combinations of length n.
29. Given a string, find all permutations of the string.
30. Find the longest common prefix string amongst an array of strings.
31. Check if a binary tree is a valid binary search tree.
32. Implement a function to count the number of ways to climb stairs.
33. Determine the maximum sum of non-overlapping subarrays.
34. Find the smallest window in a string containing all characters of another string.
35. Calculate the length of the longest palindromic subsequence in a string.
36. Count the number of words in a sentence that start with a vowel.
37. Find the kth smallest element in a sorted matrix.
38. Check if a string is an anagram of another string.
39. Find all unique quadruplets in an array that sum up to a target.
40. Implement a function to rotate a 2D matrix by 90 degrees.