Types of Algorithms Flashcards
Brute Force
straightforward approach to solve problem by trying all possible solutions
Greedy
make the locally optimal choice at each stage with the hope that these local solutions will lead to a global optimum
Dynamic Programming
divide the problem into smaller subproblems and storing the solutions to subproblems to avoid redundant calculations
Divide & Conquer
divide the problem into smaller subproblems, solve them independently and then combine the results to solve overall problem
Backtracking
Systematically explore all possible solutions by trying and rejecting possibilities based on constraints
A _____ approach to finding the smallest coin combination to make a certain amount of money involves picking the largest coins first
Greedy Algorithm
Merge Sort divides an array into two halves, sorts each half, and then merges them back together. This is an example of:
Divide and Conquer Algorithms
_______ stores the solutions to overlapping subproblems so that you do not solve the same problem multiple times. It’s used for optimization problems.
Dynamic Programming