Post

JavaScript Daily
JavaScript Daily@JavaScriptDaily·
Presenting the "sleep sort", our favorite O(wtf) sorting algorithm. (C'mon, it's the weekend..) 😂
JavaScript Daily tweet media
English
21
892
1.4K
0
ohcibi
ohcibi@ohcibi·
@JavaScriptDaily The complexity should be O(n) as sleeping does increase it. Pretty strong stuff!!
English
0
0
0
0
naresh vadlamani
naresh vadlamani@chenchu_naresh·
@JavaScriptDaily Check this out . function sorting(arr) { const sortArr = []; arr.forEach((a) => (sortArr[a] = a)); return sortArr.filter((s) => s != null); }
English
0
0
0
0
Mark Kawakami
Mark Kawakami@skippykawakami·
@JavaScriptDaily This is actually kinda genius. I'm giving respect for originality and comedic timing.
English
1
0
22
0
stephband
stephband@stephband·
@JavaScriptDaily @jonikorpi With a little modification that could work really well as a quick way of scheduling the Web Audio API just ahead of time.
English
0
0
3
0
Jon Donkin
Jon Donkin@Jondonkin·
@JavaScriptDaily I tried in C#, works in .net framework but not in .net, they must have changed something about Parallel.ForEach.
English
0
0
0
2
공유