Browse

Data Structures: Use & Time Complexity

Test your knowledge of common data structures, their typical uses, and the Big-O time complexity of their core operations.

Code34 items3 levelsDifficulty 3/5
Start training →

Free · no signup · works on any device

Levels

Start easy — harder levels unlock as you improve, or jump ahead anytime.

1
Basics
10 items
2
Time Complexity
11 items
3
Advanced
13 items

All 34 cards

Which data structure follows Last-In-First-Out (LIFO) order?
Stack
Which data structure follows First-In-First-Out (FIFO) order?
Queue
Which data structure stores key-value pairs for fast lookup?
Hash table
Which linear structure stores elements in contiguous memory with index access?
Array
Which structure links nodes together, each pointing to the next?
Linked list
Which structure organizes data in nodes with parent-child relationships?
Tree
Which structure represents vertices connected by edges?
Graph
What stack operation adds an element to the top?
Push
What stack operation removes the top element?
Pop
A tree-based structure where each node has at most two children?
Binary tree
Time complexity of accessing an array element by index?
O(1)
Average time complexity of search in a hash table?
O(1)
Time complexity of searching an unsorted array?
O(n)
Time complexity of binary search on a sorted array?
O(log n)
Time complexity of push and pop on a stack?
O(1)
Time complexity of enqueue and dequeue on a queue?
O(1)
Time complexity of inserting at the head of a linked list?
O(1)
Time complexity of searching a singly linked list?
O(n)
Average time complexity of search in a balanced binary search tree?
O(log n)
Worst-case time complexity of search in an unbalanced binary search tree?
O(n)
Time complexity of inserting at the end of a dynamic array (amortized)?
O(1)
A tree-based structure where the parent is always smaller (or larger) than its children?
Heap
Which structure efficiently retrieves the minimum or maximum element?
Priority queue
Time complexity of insert and extract-min on a binary heap?
O(log n)
Time complexity of peeking at the min/max in a heap?
O(1)
Which tree structure stores strings for prefix-based search?
Trie
A self-balancing binary search tree using rotations and a balance factor?
AVL tree
A self-balancing BST using node colors for balance?
Red-black tree
Which structure tracks connected components and supports union/find?
Disjoint set
Graph representation using a 2D matrix of edge presence?
Adjacency matrix
Graph representation listing neighbors for each vertex?
Adjacency list
Space complexity of an adjacency matrix for V vertices?
O(V^2)
Time complexity of search in a trie for a key of length m?
O(m)
Worst-case lookup time in a hash table with many collisions?
O(n)

Keep going

Big-O Time Complexity of Common Operations & Algorithms

Test your knowledge of the time complexity of common data structure operations and classic algorithms.

Code35 items

Gang of Four Design Patterns: What They Solve

Match each problem to the classic Gang of Four design pattern that solves it.

Code23 items

Common Network Ports and Their Services

Learn which service runs on each well-known TCP/UDP port number.

Code40 items

CSS Properties and What They Control

Learn the most common CSS properties and the styling each one controls.

Code36 items