Algorithms Flashcards
A* Algorithm
Algorithm that uses heuristics to find the shortest path from one node of a weighted graph to another
Big O Notation
Notation that describes the worst-case time complexity of an algorithm for a given input size
Binary Search
Algorithm that continuously splits a sorted list by checking the middle of the list to find a particular value
Breadth-First Search
Algorithm that explores a tree or graph level by level to find a particular value, starting at the root node
Bubble Sort
Algorithm that repeatedly compares and swaps each pair of values in a list until the list is sorted
Constant
Time complexity of an algorithm that runs in the same amount of time no matter how much data it is given
Depth First Search
Algorithm that explores each branch of a tree or graph to find a particular value before backtracking
Exponential
Time complexity of an algorithm whose time to run is xⁿ, where x is a constant and n is the size of the input data
Insertion Sort
Algorithm that moves data items one at a time from an ‘unsorted’ list to a new ‘sorted’ list
Linear
Time complexity of an algorithm whose time to run is xⁿ, where x is a constant and n is the size of the input data
Linear Search
Algorithm that tries to find a particular value by checking every value in a list in order
Logarithmic
Time complexity of an algorithm whose time to run is log(xⁿ), where x is a constant and n is the size of the input data
Merge Sort
Algorithm that splits a list into individual values, and combines them into sorted lists of increasing sizes until all values are in a single sorted list
Polynomial
Time complexity of an algorithm whose time to run is nˣ, where x is a constant and n is the size of the input data
Quick Sort
Algorithm that repeatedly divides a list into two, placing lower values to the left and higher values to the right