Algorithm Design Study Cards

Enhance Your Learning with Algorithm Design Flash Cards for quick learning



Algorithm

A step-by-step procedure or a set of rules for solving a specific problem or accomplishing a specific task.

Time Complexity

A measure of the amount of time an algorithm takes to run as a function of the length of the input.

Space Complexity

A measure of the amount of memory an algorithm requires to run as a function of the length of the input.

Asymptotic Notation

A mathematical notation used to describe the limiting behavior of a function when the argument tends towards a particular value or infinity.

Big O Notation

A notation used to describe the upper bound or worst-case scenario of the time or space complexity of an algorithm.

Omega Notation

A notation used to describe the lower bound or best-case scenario of the time or space complexity of an algorithm.

Theta Notation

A notation used to describe both the upper and lower bounds of the time or space complexity of an algorithm.

Divide and Conquer

A problem-solving technique that involves breaking a problem into smaller subproblems, solving them independently, and combining the solutions to solve the original problem.

Merge Sort

A divide and conquer sorting algorithm that recursively divides the input array into two halves, sorts them separately, and then merges the sorted halves.

Quick Sort

A divide and conquer sorting algorithm that selects a pivot element, partitions the array around the pivot, and recursively sorts the subarrays.

Greedy Algorithm

An algorithmic paradigm that follows the problem-solving heuristic of making the locally optimal choice at each stage with the hope of finding a global optimum.

Knapsack Problem

A classic optimization problem in computer science that involves selecting a subset of items with maximum value, given a weight constraint.

Dynamic Programming

A problem-solving technique that involves breaking a problem into smaller overlapping subproblems, solving them independently, and storing the solutions to avoid redundant computations.

Fibonacci Sequence

A sequence of numbers in which each number is the sum of the two preceding ones, starting from 0 and 1.

Backtracking

A problem-solving technique that involves exploring all possible solutions by incrementally building a solution and undoing the choices that lead to dead ends.

N-Queens Problem

A classic problem in computer science that involves placing N queens on an N×N chessboard such that no two queens threaten each other.

Graph

A collection of nodes (vertices) and edges that connect pairs of nodes, representing relationships between them.

Breadth-First Search

A graph traversal algorithm that explores all the vertices of a graph in breadth-first order, visiting all the neighbors of a vertex before moving to the next level.

Depth-First Search

A graph traversal algorithm that explores all the vertices of a graph in depth-first order, visiting as far as possible along each branch before backtracking.

Dijkstra's Algorithm

An algorithm for finding the shortest paths between nodes in a graph, with non-negative edge weights.

Bellman-Ford Algorithm

An algorithm for finding the shortest paths between nodes in a graph, even in the presence of negative edge weights.

Sorting Algorithm

An algorithm that puts elements of a list in a certain order, such as numerical or lexicographical order.

Bubble Sort

A simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.

Insertion Sort

A simple sorting algorithm that builds the final sorted array one item at a time, by inserting each item into its correct position within the sorted portion of the array.

Selection Sort

A simple sorting algorithm that repeatedly finds the minimum element from the unsorted part of the array and swaps it with the first element.

Data Structure

A way of organizing and storing data in a computer's memory, such as arrays, linked lists, stacks, queues, trees, and graphs.

Array

A data structure that stores a fixed-size sequential collection of elements of the same type.

Linked List

A data structure that consists of a sequence of nodes, where each node contains a reference to the next node in the sequence.

Stack

A data structure that follows the Last-In-First-Out (LIFO) principle, where the last element added is the first one to be removed.

Queue

A data structure that follows the First-In-First-Out (FIFO) principle, where the first element added is the first one to be removed.

Tree

A hierarchical data structure that consists of nodes connected by edges, with a single node called the root and no cycles.

Binary Search Tree

A binary tree data structure in which each node has at most two children, and the left child is less than the parent while the right child is greater.

Heap

A complete binary tree data structure that satisfies the heap property, where the parent node is either greater than or equal to its children.

Directed Graph

A graph in which edges have a direction, indicating a one-way relationship between vertices.

Undirected Graph

A graph in which edges have no direction, indicating a two-way relationship between vertices.

Adjacency Matrix

A square matrix used to represent a finite graph, where the elements indicate whether pairs of vertices are adjacent or not in the graph.

Adjacency List

A collection of unordered lists used to represent a finite graph, where each list represents the set of neighbors of a vertex.

Algorithmic Paradigm

A general approach or methodology for solving problems using algorithms, such as brute force, divide and conquer, greedy, and dynamic programming.

Brute Force

A straightforward approach to problem-solving that involves trying all possible solutions and selecting the best one.

Optimization Problem

A problem that involves finding the best solution from all feasible solutions, typically maximizing or minimizing an objective function.

Approximation Algorithm

An algorithm that finds a solution that is close to the optimal solution for an optimization problem, but not necessarily the best.

Randomized Algorithm

An algorithm that uses a random number generator to make decisions or introduce randomness in order to achieve a desired outcome.

Parallel Algorithm

An algorithm that solves a problem by dividing it into smaller subproblems that can be solved simultaneously on multiple processors or cores.

Online Algorithm

An algorithm that processes its input piece by piece in a serial manner, without having the entire input available from the beginning.

NP-Completeness

A property of decision problems that belong to the complexity class NP and are at least as hard as the hardest problems in NP.

P vs NP Problem

A major unsolved problem in computer science that asks whether every problem whose solution can be verified quickly can also be solved quickly.