@@ -11,6 +11,11 @@ import StringSearchAlgorithms from './StringSearchAlgorithms';
1111// Get the base URL dynamically
1212const baseUrl = window . location . origin ;
1313
14+ // XXX should include category plus visibility flag so algorithms are
15+ // just listed in one place (here) and filtered appropriately rather
16+ // than have multiple algorithm lists (here plus SortingAlgorithms.js
17+ // plus InsertSearchAlgorithms.js etc), as was done previously...
18+ // XXX also fix display code (see XXX elsewhere)
1419const allAlgorithms = [
1520 { name : 'Brute Force' , url : `${ baseUrl } /?alg=bruteForceStringSearch&mode=search` } ,
1621 { name : "Horspool's" , url : `${ baseUrl } /?alg=horspoolStringSearch&mode=search` } ,
@@ -25,6 +30,7 @@ const allAlgorithms = [
2530 { name : "Warshall's (transitive closure)" , url : `${ baseUrl } /?alg=transitiveClosure&mode=tc` } ,
2631 { name : 'Binary Search Tree' , url : `${ baseUrl } /?alg=binarySearchTree&mode=search` } ,
2732 { name : '2-3-4 Tree' , url : `${ baseUrl } /?alg=TTFTree&mode=search` } ,
33+ { name : 'AVL Tree' , url : `${ baseUrl } /?alg=AVLTree&mode=search` } ,
2834 { name : 'Union Find' , url : `${ baseUrl } /?alg=unionFind&mode=find` } ,
2935 { name : 'Heapsort' , url : `${ baseUrl } /?alg=heapSort&mode=sort` } ,
3036 { name : 'Quicksort' , url : `${ baseUrl } /?alg=quickSort&mode=sort` } ,
@@ -68,13 +74,13 @@ const Mainmenu = () => {
6874 < div className = "sidebar" >
6975 < img src = { logo } alt = "Logo" className = "logo" />
7076 < h1 className = "title" >
71- < span className = "algorithm" > Algorithm </ span >
77+ < span className = "algorithm" > Algorithms </ span >
7278 < span className = "in-action" > In Action</ span >
7379 </ h1 >
7480 < div className = "search-container" >
7581 < input
7682 type = "text"
77- placeholder = "Search Algorithms "
83+ placeholder = "Search for algorithm "
7884 value = { searchTerm }
7985 onChange = { handleSearch }
8086 className = "search-bar"
@@ -106,4 +112,4 @@ const Mainmenu = () => {
106112 ) ;
107113} ;
108114
109- export default Mainmenu ;
115+ export default Mainmenu ;
0 commit comments