Different types of algorithms
Programming Exercises:
-
Implement a binary search algorithm for an array of integers.
-
Implement a bubble sort algorithm for an array of integers.
-
Implement a selection sort algorithm for an array of integers.
-
Implement an insertion sort algorithm for an array of integers.
-
Implement a merge sort algorithm for an array of integers.
-
Implement a quick sort algorithm for an array of integers.
-
Implement a linear search algorithm for an array of integers.
-
Implement a hash table data structure using separate chaining collision resolution.
-
Implement a hash table data structure using linear probing collision resolution
-
Implement a heap data structure and use it to sort an array of integers.
Programming Exercises:
-
Implement a recursive algorithm for computing the factorial of a given positive integer using divide-and-conquer.
-
Implement a recursive algorithm for computing the Fibonacci sequence using divide-and-conquer.
-
Implement a recursive algorithm for computing the greatest common divisor of two integers using divide-and-conquer.
-
Implement a recursive algorithm for computing the Euclidean distance between two points in 2D space using divide-and-conquer.
-
Implement a divide-and-conquer algorithm for finding the maximum subarray sum of a given array of integers.
-
Implement a divide-and-conquer algorithm for merging two sorted arrays.
-
Implement a divide-and-conquer algorithm for finding the kth largest element in an unsorted array of integers.
-
Implement a divide-and-conquer algorithm for multiplying two large integers.
-
Implement a divide-and-conquer algorithm for finding the closest pair of points in 2D space.
-
Implement a divide-and-conquer algorithm for sorting a linked list.
Programming Exercises:
-
Implement the Fibonacci sequence using dynamic programming. Analyze the time complexity of your implementation and compare it with the time complexity of a recursive implementation.
-
Implement the longest common subsequence problem using dynamic programming. Analyze the time and space complexity of your implementation and compare it with the time and space complexity of a naive recursive implementation.
-
Implement the knapsack problem using dynamic programming. Analyze the time and space complexity of your implementation and compare it with the time and space complexity of a greedy algorithm.
-
Implement the rod-cutting problem using dynamic programming. Analyze the time and space complexity of your implementation and compare it with the time and space complexity of a naive recursive implementation.
-
Implement the matrix chain multiplication problem using dynamic programming. Analyze the time and space complexity of your implementation and compare it with the time and space complexity of a naive recursive implementation.
-
Develop a dynamic programming algorithm for the edit distance problem. Analyze the time and space complexity of your implementation and compare it with the time and space complexity of a naive recursive implementation.
-
Develop a dynamic programming algorithm for the coin change problem. Analyze the time and space complexity of your implementation and compare it with the time and space complexity of a greedy algorithm.
-
Implement a dynamic programming algorithm to find the maximum sum subarray. Analyze the time and space complexity of your implementation and compare it with the time and space complexity of a naive brute-force approach.
-
Develop a dynamic programming algorithm to find the longest increasing subsequence. Analyze the time and space complexity of your implementation and compare it with the time and space complexity of a brute-force approach.
-
Create a flowchart for a dynamic programming algorithm that solves the longest common substring problem. Analyze the time and space complexity of the algorithm and compare it with the time and space complexity of a brute-force approach.