Comments (2)
Thanks for the example!
I need to rewrite this algorithm with a better approach!
from javascript-datastructures-algorithms.
Hi,
Added 2 versions of this algorithm with the fixes:
- Version 1: Update hash after each deletion: https://github.com/loiane/javascript-datastructures-algorithms/blob/third-edition/src/js/data-structures/hash-table-linear-probing.js
- Version 2: Soft delete: https://github.com/loiane/javascript-datastructures-algorithms/blob/third-edition/src/js/data-structures/hash-table-linear-probing-lazy.js
Also added some tests with Mocha to make sure different scenarios were covered:
- Version 1: https://github.com/loiane/javascript-datastructures-algorithms/blob/third-edition/test/js/data-structures/hash-table-linear-probing.spec.js
- Version 2: https://github.com/loiane/javascript-datastructures-algorithms/blob/third-edition/test/js/data-structures/hash-table-linear-probing-lazy.spec.js
from javascript-datastructures-algorithms.
Related Issues (20)
- The function findValue of KnapSack
- Set's implementation is not rigorous. HOT 2
- data structures HOT 1
- Chapter 07 Sets 7.3 isSubsetOf HOT 3
- compareFn is so great hahaha HOT 1
- Made some suggestions HOT 2
- Submitting algorithms HOT 3
- Array Data Structure HOT 1
- e a issue about npm run serve HOT 1
- Insert function of circular-linked-list in charpter6 is error HOT 6
- Can't find the example in Chapter 10 and the RedBlackTree code
- Chapter 10 examples are missing
- DP algorithm for min-coin-change.js
- The function patition for quickSort can't support array which has duplicates.
- Incorrect return value of Kruskal
- Found broken Link under List of available chapters
- wrong returned value in hash-table-linear-probing
- Why is the hash-table doesn't implement by an array? HOT 1
- Recursion Section - Fibonacci with memoization HOT 2
- Chapter 12: toposort, copy for result.finished?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javascript-datastructures-algorithms.