DSA-VerseLearn by watching code run
DashboardData StructuresAlgorithmsVisualizerCORECoding PlaygroundInterview QuestionsComplexity AnalyzerLearning NotesBookmarksLearning ProgressSettings

Algorithms

Explanations, pseudocode, an embedded interactive visualization, implementations in JavaScript, Python, Java and Go, complexity and interview variations.

Array & Data-Structure Operations

Reverse an Array

Interactive

Reverses an array in place with two pointers: swap the outermost pair, move both pointers inward, and stop when they meet.

O(n) · 4 languages

Two Sum

Interactive

Finds two indexes whose values add up to a target in one pass, storing each value's index in a hash map and looking up the complement (target − value).

O(n) · 4 languages

Singly Linked List Insertion

Interactive

Inserts a new node at a given position: walk to the node just before the position, point the new node at its successor, then re-link the predecessor to the new node.

O(n) · 4 languages

Stack Push and Pop

Interactive

A stack is Last-In-First-Out (LIFO): push adds to the top, pop removes from the top. A fixed capacity shows overflow (push when full) and underflow (pop when empty).

O(1) · 4 languages

Queue Enqueue and Dequeue

Interactive

A queue is First-In-First-Out (FIFO): enqueue adds at the rear, dequeue removes from the front. This circular-array queue wraps the rear pointer around to reuse freed slots.

O(1) · 4 languages