From 45762726c028eb4fd80656aa5758dcfb6c28dcb1 Mon Sep 17 00:00:00 2001 From: Kai Chappell Date: Sun, 14 Sep 2025 19:36:14 +0100 Subject: [PATCH] uk spelling: labelled --- frontend/src/content/algorithms/implement-trie.ts | 4 ++-- frontend/src/content/algorithms/redundant-connection.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/content/algorithms/implement-trie.ts b/frontend/src/content/algorithms/implement-trie.ts index 007faf9..2e34da1 100644 --- a/frontend/src/content/algorithms/implement-trie.ts +++ b/frontend/src/content/algorithms/implement-trie.ts @@ -125,7 +125,7 @@ export const implementTrieAlgorithm: AlgorithmDefinition = { problemStatement: 'Implement a trie with insert, search, and startsWith methods. insert(word) inserts a word into the trie. search(word) returns true if the word exists. startsWith(prefix) returns true if any word starts with the given prefix.', intuition: - 'Think of a trie like a filing cabinet where each drawer is labeled with a letter. To find a word, you open drawers one letter at a time. Words sharing the same prefix share the same path through the drawers, making prefix operations very efficient.', + 'Think of a trie like a filing cabinet where each drawer is labelled with a letter. To find a word, you open drawers one letter at a time. Words sharing the same prefix share the same path through the drawers, making prefix operations very efficient.', code: { language: 'python', code: `class TrieNode: @@ -204,7 +204,7 @@ class Trie: id: 'intuition-1', phase: 'intuition', explanation: - 'Imagine a filing cabinet where each drawer is labeled with a single letter. To store the word "app", you open drawer "a", then find drawer "p" inside it, then drawer "p" inside that. The final drawer is marked as "end of word".', + 'Imagine a filing cabinet where each drawer is labelled with a single letter. To store the word "app", you open drawer "a", then find drawer "p" inside it, then drawer "p" inside that. The final drawer is marked as "end of word".', dataState: { arrays: [], pointers: [], diff --git a/frontend/src/content/algorithms/redundant-connection.ts b/frontend/src/content/algorithms/redundant-connection.ts index fdb1987..be24c65 100644 --- a/frontend/src/content/algorithms/redundant-connection.ts +++ b/frontend/src/content/algorithms/redundant-connection.ts @@ -88,7 +88,7 @@ export const redundantConnectionAlgorithm: AlgorithmDefinition = { 'A data structure that tracks a partition of elements into disjoint sets, supporting near-constant time union and find operations with path compression and union by rank.', }, problemStatement: - 'Given a graph that started as a tree with n nodes (labeled 1 to n), with one additional edge added. Find the edge that can be removed so that the remaining graph is a tree.', + 'Given a graph that started as a tree with n nodes (labelled 1 to n), with one additional edge added. Find the edge that can be removed so that the remaining graph is a tree.', intuition: 'A tree with n nodes has exactly n-1 edges. If we add one more edge, it creates exactly one cycle. If we process edges one by one and try to union the two nodes, the moment we find that both nodes already share the same root, we\'ve found the redundant edge that would create a cycle.', code: {