Algorithm Review
banner
algorithmreview.bsky.social
Algorithm Review
@algorithmreview.bsky.social
Helpful posts about computer science algorithms, data structures, and more. Please DM any corrections.
Breadth-First Search (BFS) is a graph traversal algorithm that explores all neighbors at the current depth before moving on to nodes at the next depth level.

• Time complexity: O(V + E)
• Space complexity: O(V)

#AlgorithmReview
December 19, 2025 at 1:45 PM
Knapsack Problem (0/1) is a dynamic programming algorithm for solving the knapsack problem that determines the maximum value that can be obtained without exceeding the weight capacity.

• Time complexity: O(nW)
• Space complexity: O(nW)

#AlgorithmReview
December 18, 2025 at 1:48 PM
Binary Search is an efficient algorithm for finding an item from a sorted list that repeatedly divides the search interval in half until the target value is found.

• Time complexity: O(log n)
• Space complexity: O(1)

#AlgorithmReview
December 17, 2025 at 1:46 PM
Floyd-Warshall is an algorithm for finding shortest paths in a weighted graph with positive or negative edge weights that uses dynamic programming to update the shortest paths between all pairs of vertices.

• Time complexity: O(V^3)
• Space complexity: O(V^2)

#AlgorithmReview
December 16, 2025 at 1:49 PM
Depth-First Search (DFS) is a graph traversal algorithm that explores as far as possible along each branch before backtracking.

• Time complexity: O(V + E)
• Space complexity: O(V) but may vary depending on implementation

#AlgorithmReview
December 15, 2025 at 1:49 PM
Selection sort is a simple comparison-based sorting algorithm that repeatedly selects the minimum element from the unsorted part and moves it to the sorted part.

• Time complexity: O(n^2)
• Space complexity: O(1)

#AlgorithmReview
December 14, 2025 at 1:41 PM
Breadth-First Search (BFS) is a graph traversal algorithm that explores all neighbors at the current depth before moving on to nodes at the next depth level.

• Time complexity: O(V + E)
• Space complexity: O(V)

#AlgorithmReview
December 13, 2025 at 1:41 PM
Breadth-First Search (BFS) is a graph traversal algorithm that explores all neighbors at the current depth before moving on to nodes at the next depth level.

• Time complexity: O(V + E)
• Space complexity: O(V)

#AlgorithmReview
December 12, 2025 at 1:47 PM
Bubble sort is a simple but inefficient sorting algorithm that repeatedly compares adjacent elements in a list, swapping them if they are out of order.

• Time complexity: O(n^2)
• Space complexity: O(1)

#AlgorithmReview
December 11, 2025 at 1:49 PM
Breadth-First Search (BFS) is a graph traversal algorithm that explores all neighbors at the current depth before moving on to nodes at the next depth level.

• Time complexity: O(V + E)
• Space complexity: O(V)

#AlgorithmReview
December 10, 2025 at 1:48 PM
Breadth-First Search (BFS) is a graph traversal algorithm that explores all neighbors at the current depth before moving on to nodes at the next depth level.

• Time complexity: O(V + E)
• Space complexity: O(V)

#AlgorithmReview
December 9, 2025 at 1:47 PM
Breadth-First Search (BFS) is a graph traversal algorithm that explores all neighbors at the current depth before moving on to nodes at the next depth level.

• Time complexity: O(V + E)
• Space complexity: O(V)

#AlgorithmReview
December 8, 2025 at 1:46 PM
Merge sort is an efficient, stable, divide-and-conquer sorting algorithm that recursively divides the list into halves, sorts each half, and merges them back together.

• Time complexity: O(n log n)
• Space complexity: O(n)

#AlgorithmReview
December 7, 2025 at 1:40 PM
Dijkstra's Algorithm is an algorithm for finding the shortest paths between nodes in a graph that maintains a priority queue to explore the shortest known distance to each vertex.

• Time complexity: O((V + E) log V)
• Space complexity: O(V)

#AlgorithmReview
December 6, 2025 at 1:41 PM
Dijkstra's Algorithm is an algorithm for finding the shortest paths between nodes in a graph that maintains a priority queue to explore the shortest known distance to each vertex.

• Time complexity: O((V + E) log V)
• Space complexity: O(V)

#AlgorithmReview
December 5, 2025 at 1:45 PM
Quick sort is a fast, divide-and-conquer sorting algorithm that selects a pivot element and partitions the list into sublists of elements less than and greater than the pivot.

• Time complexity: O(n^2) (worst), O(n log n) (average)
• Space complexity: O(log n)

#AlgorithmReview
December 4, 2025 at 1:48 PM
Breadth-First Search (BFS) is a graph traversal algorithm that explores all neighbors at the current depth before moving on to nodes at the next depth level.

• Time complexity: O(V + E)
• Space complexity: O(V)

#AlgorithmReview
December 3, 2025 at 1:48 PM
Breadth-First Search (BFS) is a graph traversal algorithm that explores all neighbors at the current depth before moving on to nodes at the next depth level.

• Time complexity: O(V + E)
• Space complexity: O(V)

#AlgorithmReview
December 2, 2025 at 1:48 PM
Depth-First Search (DFS) is a graph traversal algorithm that explores as far as possible along each branch before backtracking.

• Time complexity: O(V + E)
• Space complexity: O(V) but may vary depending on implementation

#AlgorithmReview
December 1, 2025 at 1:47 PM
Insertion sort is a simple sorting algorithm suitable for small datasets that builds the final sorted array one item at a time, inserting elements into their correct position.

• Time complexity: O(n^2)
• Space complexity: O(1)

#AlgorithmReview
November 30, 2025 at 1:41 PM
Binary Search is an efficient algorithm for finding an item from a sorted list that repeatedly divides the search interval in half until the target value is found.

• Time complexity: O(log n)
• Space complexity: O(1)

#AlgorithmReview
November 29, 2025 at 1:41 PM
Quick sort is a fast, divide-and-conquer sorting algorithm that selects a pivot element and partitions the list into sublists of elements less than and greater than the pivot.

• Time complexity: O(n^2) (worst), O(n log n) (average)
• Space complexity: O(log n)

#AlgorithmReview
November 28, 2025 at 1:43 PM
Insertion sort is a simple sorting algorithm suitable for small datasets that builds the final sorted array one item at a time, inserting elements into their correct position.

• Time complexity: O(n^2)
• Space complexity: O(1)

#AlgorithmReview
November 27, 2025 at 1:45 PM
Heap sort (in-place) is a comparison-based sorting algorithm using a binary heap data structure that repeatedly removes the root (largest or smallest element depending on the heap type) and maintains the heap property.

• Time complexity: O(n log n)
• Space complexity: O(1)

#AlgorithmReview
November 26, 2025 at 1:47 PM
Binary Search is an efficient algorithm for finding an item from a sorted list that repeatedly divides the search interval in half until the target value is found.

• Time complexity: O(log n)
• Space complexity: O(1)

#AlgorithmReview
November 25, 2025 at 1:46 PM