Algorithm Browser

Algorithms

Searching

2

Linear Search

EasyO(n)

Simple sequential search through an array

Binary Search

EasyO(log n)

Efficient search in sorted arrays by eliminating half of remaining elements

Linked Lists

3

Singly Linked List

MediumO(n)

Data structure with nodes pointing to the next node

Doubly Linked List

MediumO(n)

Linked list with nodes pointing both forward and backward

Circular Linked List

MediumO(n)

Linked list where the last node points back to the first

Graph

1

Dijkstra's Algorithm

HardO(E + V log V)

Finds shortest paths from a source in a weighted graph using a priority queue

Tree

2

BST Traversal

MediumO(n)

Inorder, preorder, and postorder traversal of binary search trees

Binary Search Tree

MediumO(log n)

Sorted tree structure enabling efficient search and insertion

Recursion

2

Factorial

EasyO(n)

Calculate n! using recursive function calls

Tower of Hanoi

MediumO(2ⁿ)

Classic recursion problem of moving disks between pegs