Everything on the site.

Big-O notationAlgorithms · Count the steps in real loops, then compare n, n log n, n² and 2ⁿ on a live chart.RecursionAlgorithms · Watch frames push and pop on the call stack for factorial and Fibonacci.BFS vs DFSAlgorithms · A queue against a stack: draw a graph and see which order each search visits it in.Sorting algorithmsAlgorithms · Seven sorts on the same input, with comparison, swap and write counts side by side.Binary searchAlgorithms · Halve the range, probe the middle, repeat: with lo, mid and hi drawn on the array.Sets, relations and functionsDiscrete maths · Shade any set expression on a Venn diagram and test a relation for its properties.Proof by inductionDiscrete maths · Four worked proofs revealed one step at a time, and a broken one to diagnose.CombinatoricsDiscrete maths · An exact nPr and nCr calculator, and a Pascal’s triangle that shows its own addition rule.Boolean algebraDiscrete maths · The laws, De Morgan, and normal forms, with a truth-table generator built in.Finite-state machinesTheory · Build a DFA in a table, see it drawn, and run strings through it one symbol at a time.Domain theoryTheory · Why recursion needs least fixed points, and how CPOs, Scott continuity and powerdomains supply them.Truth table generatorTools · Expression in, truth table out: with DNF, CNF, a minimal form and LaTeX.Graph traversal visualiserTools · Draw a graph, then animate BFS, DFS and Dijkstra with the frontier shown.Recursion tree visualiserTools · Paste a recursive function or a recurrence and see its call tree and call count.Gradient descentML maths · Drag the starting point, set the learning rate, and watch it converge or blow up.Vectors and embeddingsML maths · Bend the plane with a 2×2 matrix and measure how close toy word vectors are.Softmax and cross-entropyML maths · Edit the logits and watch the probabilities, the loss and the gradient update live.AttentionML maths · Q, K and V for three tokens, a live score heatmap, and the weighted sum of values.Formatting a CS paper in LaTeXLaTeX · Page limits, \documentclass, front matter, theorem environments and the bibliography.Camera-ready checklistLaTeX · Fonts embedded, PDF/A, copyright form, source bundle, and why final versions get rejected.LaTeX templatesLaTeX · Where the official classes live, plus a minimal article template you can copy.AlgorithmsSection · Step-through visualisations of sorting, searching, recursion, graph traversal and Big-O growth, each with pseudocode that highlights the line being run.Discrete mathsSection · Sets, relations and functions, proof by induction, counting, and Boolean algebra, explained with worked examples and small interactive checkers.TheorySection · Finite-state machines, automata and the mathematical semantics of programming languages, explained from first principles.ML mathsSection · Gradient descent, vectors and embeddings, softmax and cross-entropy, and attention, each with a formula, a worked numeric example and a live version.ToolsSection · A truth-table generator with CNF, DNF and LaTeX output, a graph-traversal visualiser for BFS, DFS and Dijkstra, and a recursion-tree visualiser.LaTeXSection · How to format a CS conference or workshop paper in LaTeX, a camera-ready checklist, and a minimal template you can adapt.
Free tool

Graph traversal visualiser: BFS, DFS and Dijkstra

Draw a graph, or start from a preset, and animate breadth-first search, depth-first search or Dijkstra’s shortest-path algorithm one step at a time. The frontier, visit order and distances update as you step, alongside highlighted pseudocode.

Interactive: Drawable graph with BFS, DFS and Dijkstra animationUpdated

Graph traversal visualiserDraw your own graph or start from a preset, then pick an algorithm and a start vertex.

Drag vertices to move them. Click a vertex or edge to edit it.
  • Current vertex
  • Discovered / in the frontier
  • Finished (settled)
  • Edge skipped
Edit the graph as text

One edge per line: A B 4 joins A and B with weight 4 (weight optional, default 1). A line with one name adds a lone vertex.

Pseudocode

    Frontier

    Visit order

    How to use it

    • Add vertex: choose the mode, then click empty space. Vertices are named A, B, C, … automatically; select one to rename it.
    • Add edge: choose the mode, click one vertex, then another. The weight starts as the distance between them on screen, divided by 45 and rounded, so the drawing roughly matches the numbers.
    • Select / move: drag vertices around; click a vertex to rename it, start from it or delete it, and click an edge to change its weight or delete it. Delete removes the selection.
    • Edit as text: open “Edit the graph as text” for an edge list such as A B 4, one edge per line. This is the quickest way to enter a graph from a textbook exercise, and it is fully keyboard-accessible.
    • Play: use the controls under the graph, or Space to play and pause and ← → to step. The run restarts whenever you change the graph, the algorithm or the start vertex.

    The three algorithms

    Breadth-first search uses a queue and visits vertices in order of their distance in edges from the start. Depth-first search uses recursion (shown as its call stack) and follows each path as deep as it goes before backtracking. Both ignore weights and take O(V+E)O(V + E) time. The BFS vs DFS explainer compares them in detail.

    Dijkstra’s algorithm finds shortest paths when edges have non-negative weights. It is BFS with the queue replaced by a priority queue keyed by tentative distance. Each round it settles the closest unsettled vertex, whose distance is then final, and relaxes its outgoing edges: if going through it gives a neighbour a shorter route than any known so far, the neighbour’s distance and parent are updated.

    The visualiser uses the “lazy deletion” version that most real implementations use. A vertex whose distance improves is inserted into the queue again rather than updated in place, and outdated entries are skipped when they come out. Watch for “stale entry” in the narration.

    Worked example: shortest paths from S on the road map

    This is the preset the tool opens with. The final distances and the edge each shortest path arrives by are:

    VertexDistance from SShortest path
    S0S
    A5S → B → A
    B2S → B
    C9S → B → A → C
    D10S → B → D
    T13S → B → D → T

    Notice A. The direct edge S–A has weight 7, but S → B → A costs 2 + 3 = 5, so when B is settled the edge B–A is relaxed and A’s distance drops from 7 to 5. That improvement is the whole point of the algorithm.

    Why Dijkstra needs non-negative weights

    Settling a vertex is a promise that no shorter path to it will turn up later. That promise relies on every edge adding a non-negative amount: any other path must leave the settled region through a vertex that is at least as far away, and can only get longer from there. One negative edge breaks the argument, and Dijkstra can then report wrong distances. The visualiser warns when it sees a negative weight. For graphs with negative weights (but no negative cycles), use the Bellman–Ford algorithm, which takes O(VE)O(VE) time.

    Running time

    With a binary heap as the priority queue, each of the EE relaxations may push one entry, and each push or pop costs O(log⁡E)O(\log E), so Dijkstra runs in O((V+E)log⁡V)O((V + E)\log V) time. With a Fibonacci heap the bound improves to O(E+Vlog⁡V)O(E + V \log V), though binary heaps are usually faster in practice.

    Tips Toggle Directed to turn every edge into a one-way arrow, then search from a vertex that cannot reach the others; the final message lists the unreachable vertices. The 3 × 3 grid preset makes the layer-by-layer pattern of BFS easy to see.

    References

    1. E. W. Dijkstra, “A note on two problems in connexion with graphs”, Numerische Mathematik 1, 1959. doi:10.1007/BF01386390
    2. R. E. Tarjan, “Depth-first search and linear graph algorithms”, SIAM Journal on Computing 1(2), 1972. doi:10.1137/0201010
    3. “Dijkstra’s algorithm”, Wikipedia.