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.

Sorting

Bubble Sort

Interactive

Repeatedly compares adjacent elements and swaps them when they are out of order, so the largest unsorted value bubbles to the end after every pass.

O(n²) · 4 languages

Selection Sort

Interactive

Divides the array into a sorted prefix and an unsorted suffix. Each pass selects the minimum of the unsorted part and swaps it into the next position of the prefix.

O(n²) · 4 languages

Insertion Sort

Interactive

Builds a sorted prefix one element at a time: the next element (the key) is lifted out, larger elements of the prefix shift one step right, and the key drops into the gap.

O(n²) · 4 languages

Merge Sort

Planned

Divide the array in halves, sort each recursively, merge the sorted halves.

O(n log n)

Quick Sort

Planned

Partition around a pivot, then sort both sides recursively.

O(n log n) avg

Heap Sort

Planned

Build a max-heap, then repeatedly move the maximum to the end.

O(n log n)

Counting Sort

Planned

Count occurrences of each key in a small integer range.

O(n + k)

Radix Sort

Planned

Stable sort digit by digit, least significant first.

O(d·(n + b))