Algorithm Flashcards: A Study Aid for Common Algorithmic Problems
Table of Contents
1. Sorting Algorithms
1.2. Describe the basic idea of Quicksort drill algorithm
1.2.1. Answer
- Choose a pivot element
- Partition the array around the pivot
- Recursively sort the subarrays
2. Searching Algorithms
2.2. Describe the basic idea of Depth-First Search (DFS) drill algorithm
2.2.1. Answer
Explore as far as possible along each branch before backtracking
3. Graph Algorithms
3.1. What is the purpose of Dijkstra's algorithm? drill algorithm
3.1.1. Answer
To find the shortest path between nodes in a graph
3.2. What problem does the Bellman-Ford algorithm solve? drill algorithm
3.2.1. Answer
Finds shortest paths from a source vertex to all other vertices, even with negative edge weights
4. Dynamic Programming
4.1. What are the two main properties of Dynamic Programming problems? drill algorithm
4.1.1. Answer
- Optimal substructure
- Overlapping subproblems
4.2. Give an example of a classic Dynamic Programming problem drill algorithm
4.2.1. Answer
The Fibonacci sequence calculation