AlgoFlow

Practice

Short problems tied directly to the visualizations. Each one comes with layered hints, a written approach, complexity analysis, follow-up questions, and a link that opens the matching algorithm with the example input already loaded.

10

problems

Topic
Difficulty

Pair with target sum

beginner

Given a sorted array of integers and a target, return the indices of the two numbers that add up to the target. Exactly one solution exists and you may not use the same element twice.

Arrays & Two Pointers · O(n)Open

Contains duplicate

beginner

Given an array of integers, return true if any value appears at least twice, otherwise false. Explain the cost of your approach before you optimise it.

Arrays & Two Pointers · O(n) averageOpen

Search insert position

beginner

Given a sorted array of distinct integers and a target, return the index where the target is found. If it is absent, return the index where it would be inserted to keep the array sorted.

Searching · O(log n)Open

Reverse a linked list

intermediate

Given the head of a singly linked list, reverse the list so the last node becomes the head. Do it in place, using O(1) extra memory.

Linked Lists · O(n)Open

Valid parentheses

intermediate

Given a string containing only ( ) [ ] { }, determine whether it is valid: every opening bracket must be closed by the same type in the correct order.

Stacks & Queues · O(n)Open

Validate a binary search tree

intermediate

Given a binary tree, return true if it satisfies the BST ordering rule: every node's left subtree contains only smaller values and every right subtree only larger values.

Trees · O(n)Open

Shortest path in an unweighted graph

intermediate

Given an undirected graph and two nodes, find the length of the shortest path between them. Every edge costs 1.

Graphs · O(V + E)Open

Detect a cycle in a directed graph

advanced

Given a directed graph, return true if it contains a cycle — a path that follows directed edges back to a node it already visited.

Graphs · O(V + E)Open

Course schedule (topological order)

advanced

You must take numCourses courses with prerequisites given as pairs (a, b) meaning 'b before a'. Return true if you can finish every course.

Graphs · O(V + E)Open

Climbing stairs with a cost

advanced

You are climbing a staircase of n steps. Each step has a cost. You may climb 1 or 2 steps at a time. Return the minimum total cost to reach the top.

Recursion & Dynamic Programming · O(n)Open

Track your progress

Problems you mark as solved and visualizations you finish are saved locally.

Progress lives in this browser only — nothing is uploaded.