• JavaScriptDaily Profile Picture

    JavaScript Daily @JavaScriptDaily

    8 years ago

    Presenting the "sleep sort", our favorite O(wtf) sorting algorithm. (C'mon, it's the weekend..) 😂

    JavaScriptDaily tweet picture

    20 902 1K 0 3
    Download Image
  • jordanpittman Profile Picture

    Jordan Pittman @jordanpittman

    8 years ago

    @JavaScriptDaily @joseph_silber let d=t=>new Promise(r=>setTimeout(()=>r(t),t));let s=c=>Promise.all(c.map(d));s([8,42,38,111,2,39,1]).then(console.log)

    2 0 0 0 0
  • skippykawakami Profile Picture

    Mark Kawakami @skippykawakami

    8 years ago

    @JavaScriptDaily This is actually kinda genius. I'm giving respect for originality and comedic timing.

    1 0 22 0 0
  • MikhailKoptelov Profile Picture

    Михаил Коптелов @MikhailKoptelov

    8 years ago

    @JavaScriptDaily Not deterministic. Anything <10ms can return in order of calling. Can fix it up with setTimeout(..., num * 1000); Time complx is the same!

    1 0 18 0 0
  • joanmitter Profile Picture

    Joanmi oficial @joanmitter

    8 years ago

    @JavaScriptDaily @js_digest Push it to an array and you have a working algorithm :LOL:

    1 0 4 0 0
  • stephband Profile Picture

    stephband @stephband

    8 years ago

    @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.

    0 0 3 0 0
  • imjoeydias Profile Picture

    Joseph Dias @imjoeydias

    8 years ago

    @JavaScriptDaily Someone is getting fired 😂

    0 0 2 0 0
  • lpsoft_pl Profile Picture

    lpsoft @lpsoft_pl

    8 years ago

    @JavaScriptDaily Works only for positive numbers :(

    0 0 1 0 0
  • mbgidron Profile Picture

    Michael Gidron @mbgidron

    8 years ago

    @JavaScriptDaily @thekitze Lol..

    0 0 1 0 0
  • zyflovelam Profile Picture

    Dev Z. @zyflovelam

    8 years ago

    @JavaScriptDaily 😄

    0 0 0 0 0
  • ahbarrios Profile Picture

    Adrián Hernández @ahbarrios

    8 years ago

    @JavaScriptDaily wtf!

    0 0 0 0 0
  • ohcibi Profile Picture

    ohcibi @ohcibi

    8 years ago

    @JavaScriptDaily The complexity should be O(n) as sleeping does increase it. Pretty strong stuff!!

    0 0 0 0 0
  • thevs Profile Picture

    Vladas Saulis @thevs

    8 years ago

    @JavaScriptDaily Yes! It works! Ha-ha!

    0 0 0 0 0
  • codyloyd Profile Picture

    Cody Loyd @codyloyd

    8 years ago

    @JavaScriptDaily Nice one!

    0 0 0 0 0
  • OhMyJersh Profile Picture

    OhMyJersh @OhMyJersh

    8 years ago

    @JavaScriptDaily This is funny.

    0 0 0 0 0
  • chenchu_naresh Profile Picture

    naresh vadlamani @chenchu_naresh

    5 years ago

    @JavaScriptDaily Check this out . function sorting(arr) { const sortArr = []; arr.forEach((a) => (sortArr[a] = a)); return sortArr.filter((s) => s != null); }

    0 0 0 0 0
  • Khalid_nowaf Profile Picture

    Khalid Nowaf | خالد نواف @Khalid_nowaf

    8 years ago

    @JavaScriptDaily welcome to JS world 😅

    0 0 0 0 0
  • Download Image
    • Privacy
    • Term and Conditions
    • About
    • Contact Us
    • TwStalker is not affiliated with X™. All Rights Reserved. 2024 www.instalker.org

    twitter web viewer x profile viewer bayigram.com instagram takipçi satın al instagram takipçi hilesi twitter takipçi satın al tiktok takipçi satın al tiktok beğeni satın al tiktok izlenme satın al beğeni satın al instagram beğeni satın al youtube abone satın al youtube izlenme satın al sosyalgram takipçi satın al instagram ücretsiz takipçi twitter takipçi satın al tiktok takipçi satın al tiktok beğeni satın al tiktok izlenme satın al beğeni satın al instagram beğeni satın al youtube abone satın al youtube izlenme satın al metin2 metin2 wiki metin2 ep metin2 dragon coins metin2 forum metin2 board popigram instagram takipçi satın al takipçi hilesi twitter takipçi satın al tiktok takipçi satın al tiktok beğeni satın al tiktok izlenme satın al beğeni satın al instagram beğeni satın al youtube abone satın al youtube izlenme satın al buyfans buy instagram followers buy instagram likes buy instagram views buy tiktok followers buy tiktok likes buy tiktok views buy twitter followers buy telegram members Buy Youtube Subscribers Buy Youtube Views Buy Youtube Likes forstalk postegro web postegro