+
+
+
+
Data Structures

Explore common data structures and memory layouts

Browse linear, hash-based, tree, and graph data structures with detailed Big O performance specifications.

Linear Structures

4 items
BeginnerAvailable

Arrays

Fixed-size contiguous block of memory with instant index-based element access.

Access O(1)Search O(n)Insert O(n)Delete O(n)
BeginnerAvailable

Linked Lists

Linear sequence of nodes connected via pointers, allowing efficient insertions.

Access O(n)Search O(n)Insert O(1)Delete O(1)
BeginnerAvailable

Stacks

Last-In, First-Out (LIFO) structure essential for function calls and expression evaluation.

Push O(1)Pop O(1)Peek O(1)
BeginnerAvailable

Queues

First-In, First-Out (FIFO) structure used for task scheduling and breadth-first search.

Enqueue O(1)Dequeue O(1)Peek O(1)

Hash-based Structures

3 items
IntermediateIn progress

Hash Tables

Key-value pair store using hash functions for near-instant lookup and insertion.

Get O(1)*Put O(1)*Delete O(1)*
In progress
IntermediateComing soon

Sets

Collection of unique elements backed by hash functions or self-balancing trees.

Contains O(1)Add O(1)Remove O(1)
Coming soon
IntermediateComing soon

Maps

Associative array mapping unique keys to arbitrary values.

Get O(1)Set O(1)Delete O(1)
Coming soon

Trees Structures

4 items
IntermediateAvailable

Binary Trees

Hierarchical tree structure where each parent node has at most two children.

Traverse O(n)Search O(n)
IntermediateIn progress

Binary Search Trees (BST)

Sorted tree where left child < parent and right child > parent for fast searching.

Search O(log n)Insert O(log n)Delete O(log n)
In progress
IntermediateComing soon

Heaps (Min/Max)

Tree-based structure satisfying heap property, ideal for priority queues.

Find Min/Max O(1)Insert O(log n)Extract O(log n)
Coming soon
AdvancedComing soon

Tries (Prefix Trees)

Tree for efficient string lookup, autocomplete, and dictionary matching.

Insert O(L)Search O(L)Prefix Search O(L)
Coming soon

Graphs Structures

3 items
AdvancedComing soon

Graphs

Collection of vertices connected by edges representing networks and relationships.

Add Vertex O(1)Add Edge O(1)Traverse O(V + E)
Coming soon
AdvancedComing soon

Directed Graphs

Graph where edges have direction, representing one-way connections.

In-degree O(V)Out-degree O(V)Topo Sort O(V + E)
Coming soon
AdvancedComing soon

Weighted Graphs

Graph where edges carry numeric weights representing distances or costs.

Shortest Path O((V + E) log V)
Coming soon

Time Complexity Comparison

Average time complexity for core operations across primary data structures.

Data StructureCategoryAccessSearchInsertionDeletionPrimary Use Case
ArrayLinearO(1)O(n)O(n)O(n)Random access by index, buffer arrays
Singly Linked ListLinearO(n)O(n)O(1)O(1)Frequent insertions/deletions at head
StackLinearO(n)O(n)O(1)O(1)Function call stack, undo operations
QueueLinearO(n)O(n)O(1)O(1)Task scheduling, BFS queue
Hash TableHash-basedN/AO(1)*O(1)*O(1)*Fast key-value lookups and caching
Binary Search TreeTreesO(log n)O(log n)O(log n)O(log n)Dynamic sorted dataset management