Skip to content

Commit 0ee36de

Browse files
committed
feat: add Red-Black Tree visualization with keyboard shortcuts
1 parent f980080 commit 0ee36de

4 files changed

Lines changed: 712 additions & 1 deletion

File tree

src/AlgoList.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const algoMap = {
3434
ClosedHash: ['HashMap (Chaining)', algos.ClosedHash],
3535
SplayTree: ['SplayTree', algos.SplayTree],
3636
AVL: ['AVL', algos.AVL],
37+
RBT: ['Red-Black Tree', algos.RBT],
3738
BTree: ['2-4 Tree', algos.BTree],
3839
BubbleSort: ['Bubble Sort', algos.BubbleSort, true],
3940
CocktailSort: ['Cocktail Shaker Sort', algos.CocktailSort, true],
@@ -79,6 +80,7 @@ export const algoList = [
7980
'BST',
8081
'Heap',
8182
'AVL',
83+
'RBT',
8284
'BTree',
8385
'SkipList',
8486
'HashMaps',
@@ -165,7 +167,8 @@ export const relatedSearches = {
165167
OpenHash: ['ClosedHash'],
166168
ClosedHash: ['OpenHash'],
167169
SplayTree: ['BST', 'AVL', 'Heap'],
168-
AVL: ['BST', 'Heap', 'SplayTree'],
170+
AVL: ['BST', 'Heap', 'SplayTree', 'RBT'],
171+
RBT: ['BST', 'AVL', 'BTree', 'SplayTree'],
169172
BTree: ['BST', 'Heap', 'SkipList'],
170173
BubbleSort: ['InsertionSort', 'SelectionSort', 'CocktailSort'],
171174
CocktailSort: ['BubbleSort', 'InsertionSort', 'SelectionSort'],
@@ -243,6 +246,10 @@ export const algoFilter = [
243246
id: 'AVL',
244247
category: 'Trees and SkipList',
245248
},
249+
{
250+
id: 'RBT',
251+
category: 'Trees and SkipList',
252+
},
246253
{
247254
id: 'BTree',
248255
category: 'Trees and SkipList',

0 commit comments

Comments
 (0)