Small code errors for the LinkedList and HashTable data structures
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- data
Direzione di ricerca
Search the LinkedList delete() method and the HashTable constructor in the JavaScript source. Check the surrounding implementations and existing tests before making the two corrections described in the issue; done means both data structures use the intended statements without changing other behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello!
As I went through the code for these data structures, I noticed two small errors:
-
inside the
delete()method of theLinkedListdata structure, there is a line of code that says:while (this.head && this.compare.equal(this.head.value, value)). However, instead of awhileit should be anifstatement. -
inside the
constructor()of theHashTabledata structure, we initialize an array in the following way:this.buckets = Array(hashTableSize).fill(null).map(() => new LinkedList());. However, theArray()constructor should have thenewkeyword in front of it.
If you guys feel that these are important fixes to you and if you allow me to help, I would be more than glad to contribute by creating a pull request with the changes made.
- Lingua principale
- JavaScript
- Stelle
- 197k
- Fork
- 31k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di trekhleb/javascript-algorithms
-
BinarySearchTreeNode removingForse già presa @bbonch l’ha presa 241 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
trekhleb/javascript-algorithms#2102 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
trekhleb/javascript-algorithms#2221 · 4 commenti ·
-
zh-TW translations missing — should contributors help complete?Forse già presa @anees4500 l’ha presa 332 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
trekhleb/javascript-algorithms#2085 · 6 commenti · 1 reazione ·
-
LinkedList methods.Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
trekhleb/javascript-algorithms#2065 · 1 commento ·
-
Incorrect Cycle Path Construction in detectUndirectedCycleForse già presa @gb3335 l’ha presa 217 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
trekhleb/javascript-algorithms#2057 · 1 commento ·
Tutte le issue di trekhleb/javascript-algorithms
Issue simili
-
Code Cleanup Dev Environment
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ProjectSidewalk/SidewalkWebpage#5699 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
zenstackhq/zenstack#2873 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Jason-Vaughan/TangleClaw#2195 ·
I maintainer di solito rispondono entro 1 giorno
-
Update: freelancermapApertapermissions in review update icon/data
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
simple-icons/simple-icons#15062 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
githubnext/gh-aw-cao#16664 ·
I maintainer di solito rispondono entro 1 giorno