Attempting to sort a 80000 element list gives a stack overflow error.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- backend
Direzione di ricerca
Start by reading the existing Data.List.sort implementation and compare it with the linked tail-recursive merge sort. Check the list package's sort tests and add coverage for sorting a list of about 80,000 elements. Done means large-list sorting completes without a stack overflow while preserving sort behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I am new to PureScript and to learn it, I was implementing a solution to this problem: Project Euler 694. Guess what, when I tried to sort a list (Data.List.sort) of BigInts with about 80000 elements in it, the program crashed with stack out of memory error. So, I worked around it by converting the list to an array, sorting the array and converting the array back to a list.
Also, to wield my new found knowledge of PureScript, I implemented a merge-sort in purescript with a tail-recursive merge function. With this implementation of sort, the program ran successfully without any stack overflow errors. The code for the merge sort is available here: Merge Sort. Could someone replace the implementation of Data.List.sort with the above implementation so that we do not get any stack overflow errors for even modestly large size lists.
- Lingua principale
- PureScript
- Stelle
- 61
- Fork
- 50
- Merge medio
- 2g 6h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna 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 purescript/purescript-lists
-
ZipList is BindAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
purescript/purescript-lists#219 · 1 commento · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
purescript/purescript-lists#218 ·
-
Data.List.NonEmpty.intersect and Data.List.NonEmpty.intersectBy throw when intersection emptyForse già presa @evaogbe l’ha presa 1066 giorni fa. Apertagood first issue type: bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 1/100
purescript/purescript-lists#216 · 2 commenti ·
-
type: enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
purescript/purescript-lists#197 · 1 commento ·
-
type: enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 24/100
purescript/purescript-lists#194 · 5 commenti ·
Tutte le issue di purescript/purescript-lists
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
remove the use of `forget`Apertagood first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
milind-soni/OpenMausBot#5829 ·
I maintainer di solito rispondono entro 1 giorno