Oh My Algorithm
AlgorithmsExam study
KO
←
Data Structures

Algorithms · Data Structures

Choose one to explore step by step

Structures for storing and retrieving data

Linear

Stack

O(1) push/pop

A last-in, first-out structure returns the most recently added value.

Queue

O(1) enqueue/dequeue

A first-in, first-out structure returns the earliest added value.

Deque

O(1) at both ends

A deque supports insertion and removal at both ends.

Linked List

Insert O(1) · Search O(n)

Nodes store values and references that link them in sequence.

Trees

Binary Search Tree (BST)

Avg O(log n)

A binary search tree stores smaller values on the left and larger values on the right.

Heap

Insert/Delete O(log n)

This example uses a min-heap, where parents are no greater than their children.

Hash

Hash Table

Avg O(1)

Map a key through a hash function to select its storage bucket.

Learning topics

O-M-A/© 2026 OH MY ALGORITHM
AboutPrivacyTerms