Algorithm Review's Avatar

Algorithm Review

@algorithmreview

Helpful posts about computer science algorithms, data structures, and more. Please DM any corrections.

9
Followers
0
Following
397
Posts
06.02.2025
Joined
Posts Following

Latest posts by Algorithm Review @algorithmreview

Shell sort is an optimization over insertion sort that sorts elements far apart from each other and progressively reduces the gap between elements to be compared.

• Time complexity: O(n log n) to O(n^2) depending on gap sequence
• Space complexity: O(1)

#AlgorithmReview

14.03.2026 13:52 👍 0 🔁 0 💬 0 📌 0

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

13.03.2026 13:55 👍 0 🔁 0 💬 0 📌 0

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

12.03.2026 13:56 👍 0 🔁 0 💬 0 📌 0

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

11.03.2026 13:58 👍 0 🔁 0 💬 0 📌 0

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

10.03.2026 13:56 👍 0 🔁 0 💬 0 📌 0

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

09.03.2026 13:57 👍 0 🔁 0 💬 0 📌 0

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

08.03.2026 13:48 👍 0 🔁 0 💬 0 📌 0

Bucket sort is a distribution sort that works well when input is uniformly distributed that divides the elements into several buckets, sorts each bucket, and then merges them.

• Time complexity: O(n + k)
• Space complexity: O(n + k)

#AlgorithmReview

07.03.2026 13:48 👍 1 🔁 1 💬 0 📌 0

Radix sort is a non-comparative integer sorting algorithm that processes individual digits of numbers, starting from the least significant digit to the most significant.

• Time complexity: O(d * (n + k))
• Space complexity: O(n + k)

#AlgorithmReview

06.03.2026 13:55 👍 0 🔁 0 💬 0 📌 0

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

05.03.2026 13:56 👍 0 🔁 0 💬 0 📌 0

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

04.03.2026 13:55 👍 0 🔁 0 💬 0 📌 0

Radix sort is a non-comparative integer sorting algorithm that processes individual digits of numbers, starting from the least significant digit to the most significant.

• Time complexity: O(d * (n + k))
• Space complexity: O(n + k)

#AlgorithmReview

03.03.2026 13:55 👍 0 🔁 0 💬 0 📌 0

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

02.03.2026 13:56 👍 0 🔁 0 💬 0 📌 0

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

01.03.2026 13:48 👍 0 🔁 0 💬 0 📌 0

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

28.02.2026 13:47 👍 0 🔁 0 💬 0 📌 0

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

27.02.2026 13:56 👍 0 🔁 0 💬 0 📌 0

Shell sort is an optimization over insertion sort that sorts elements far apart from each other and progressively reduces the gap between elements to be compared.

• Time complexity: O(n log n) to O(n^2) depending on gap sequence
• Space complexity: O(1)

#AlgorithmReview

26.02.2026 13:59 👍 0 🔁 0 💬 0 📌 0

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

25.02.2026 13:59 👍 1 🔁 0 💬 0 📌 0

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

24.02.2026 14:00 👍 0 🔁 0 💬 0 📌 0

Radix sort is a non-comparative integer sorting algorithm that processes individual digits of numbers, starting from the least significant digit to the most significant.

• Time complexity: O(d * (n + k))
• Space complexity: O(n + k)

#AlgorithmReview

23.02.2026 13:58 👍 0 🔁 0 💬 0 📌 0

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

22.02.2026 13:50 👍 0 🔁 0 💬 0 📌 0

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

21.02.2026 13:50 👍 0 🔁 0 💬 0 📌 0

Shell sort is an optimization over insertion sort that sorts elements far apart from each other and progressively reduces the gap between elements to be compared.

• Time complexity: O(n log n) to O(n^2) depending on gap sequence
• Space complexity: O(1)

#AlgorithmReview

20.02.2026 13:56 👍 0 🔁 0 💬 0 📌 0

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

19.02.2026 13:59 👍 0 🔁 0 💬 0 📌 0

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

18.02.2026 13:58 👍 0 🔁 0 💬 0 📌 0

Counting sort is a non-comparison-based sorting algorithm suitable for small, non-negative integer ranges that counts the occurrences of each element and uses this information to place elements in the correct position.

• Time complexity: O(n + k)
• Space complexity: O(k)

#AlgorithmReview

17.02.2026 13:57 👍 0 🔁 0 💬 0 📌 0

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

16.02.2026 13:57 👍 0 🔁 0 💬 0 📌 0

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

15.02.2026 13:51 👍 0 🔁 0 💬 0 📌 0

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

14.02.2026 13:51 👍 0 🔁 0 💬 0 📌 0

Shell sort is an optimization over insertion sort that sorts elements far apart from each other and progressively reduces the gap between elements to be compared.

• Time complexity: O(n log n) to O(n^2) depending on gap sequence
• Space complexity: O(1)

#AlgorithmReview

13.02.2026 13:56 👍 0 🔁 0 💬 0 📌 0