Skip to content

Commit ca6f8a2

Browse files
committed
feat: added hashing to menu
1 parent acad150 commit ca6f8a2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/components/AlgorithmMenu.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const algorithms = {
2929
'Binary Search Tree': `${baseUrl}/?alg=binarySearchTree&mode=search`,
3030
'2-3-4 Tree': `${baseUrl}/?alg=TTFTree&mode=search`,
3131
'AVL Tree': `${baseUrl}/?alg=AVLTree&mode=search`, //TODO: Need to update URL implementation and sharing code to include menu changes
32+
'Hashing (Linear Probing)': `${baseUrl}/?alg=HashingLP&mode=insertion`,
33+
'Hashing (Double Hashing)': `${baseUrl}/?alg=HashingDH&mode=insertion`,
34+
'Hashing (Chaining)': `${baseUrl}/?alg=HashingCH&mode=insertion`,
3235
},
3336
StringSearch: {
3437
'Brute Force': `${baseUrl}/?alg=bruteForceStringSearch&mode=search`,

src/components/mainmenu/InsertSearchAlgorithms.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import React from 'react';
2-
import '../../styles/InsertSearchAlgorithms.scss';
2+
import '../../styles/InsertSearchAlgorithms.scss';
33

44
// Get the base URL dynamically
55
const baseUrl = window.location.origin;
66

77
const insertSearchAlgorithms = [
88
{ name: 'Binary Search Tree', url: `${baseUrl}/?alg=binarySearchTree&mode=search` },
99
{ name: '2-3-4 Tree', url: `${baseUrl}/?alg=TTFTree&mode=search` },
10+
{ name: 'Hashing (Linear Probing)', url: `${baseUrl}/?alg=HashingLP&mode=insertion` },
11+
{ name: 'Hashing (Double Hashing)', url: `${baseUrl}/?alg=HashingDH&mode=insertion` },
12+
{ name: 'Hashing (Chaining)', url: `${baseUrl}/?alg=HashingCH&mode=insertion` },
1013
];
1114

1215
const InsertSearchAlgorithms = () => {
@@ -22,4 +25,4 @@ const InsertSearchAlgorithms = () => {
2225
);
2326
};
2427

25-
export default InsertSearchAlgorithms;
28+
export default InsertSearchAlgorithms;

0 commit comments

Comments
 (0)