From 58aabbfa0b24d067b3bb33baf3edbe162fdd95c7 Mon Sep 17 00:00:00 2001 From: dcq-31 <64748988+dcq-31@users.noreply.github.com> Date: Sat, 13 Jun 2026 21:55:27 -0400 Subject: [PATCH] feat(graphs): add adjacency matrix representation visualizer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add an Adjacency Matrix entry to the Graphs category that animates building the N×N adjacency matrix of a directed graph, edge by edge, with the graph drawn beside the matrix. - Add the `adjacencyMatrix` concept sub-type (`AdjacencyMatrixState`) and an inline `AdjacencyMatrixViz` component reusing the existing highlight styles. - Place it at the top of the Graphs category so the representation is taught before the traversal algorithms that rely on it. - Add bilingual (en/es) descriptions and update the README catalogs. --- README.md | 26 +- README_ES.md | 26 +- src/components/ConceptVisualizer.tsx | 551 +++++++++++++++++++++++---- src/i18n/translations.ts | 52 +++ src/lib/algorithms/graphs.ts | 298 +++++++++++++-- src/lib/algorithms/index.ts | 26 +- src/lib/types.ts | 13 + 7 files changed, 849 insertions(+), 143 deletions(-) diff --git a/README.md b/README.md index ce4d6a5..a9b8c7d 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ A free, interactive web tool to learn algorithms through animated step-by-step v - **Animated visualization** — watch how the data structure transforms at each step - **Active line highlighting** — code highlights in sync with the animation - **Variable tracking** — see the state of every variable in real time -- **Contextual explanation** — understand the *why* behind each operation +- **Contextual explanation** — understand the _why_ behind each operation ## 40+ algorithms across 8 categories @@ -34,24 +34,28 @@ A free, interactive web tool to learn algorithms through animated step-by-step v