3/26(æ)ãµã¤ãã¦ãºã»ã©ãã¦ã¼ã¹ æçµææå ±åä¼ã§ã®è³æã§ãã http://atnd.org/events/26861 å®è£ 詳細 â http://www.slideshare.net/sinya8282/ss-12170832Read less
Twitterã®TLã§ç¥ã£ãã®ã ããå°ãåã«æµ·å¤ã®æ²ç¤ºæ¿ã§"sleep sort"ã¨ããã½ã¼ãã¢ã«ã´ãªãºã ãçºæãããå ¬éãããããã ããã®ã¢ã«ã´ãªãºã ãé¢ç½ãã£ãã®ã§ç´¹ä»ãã¦ã¿ãã Genius sorting algorithm: Sleep sort 1 Name: Anonymous : 2011-01-20 12:22 諸åï¼ãªã¬ã¯å¤©æãããããªãããã®ã½ã¼ãã¢ã«ã´ãªãºã ãã¿ã¦ãããããã¤ãã©ãæãï¼ #!/bin/bash function f() { sleep "$1" echo "$1" } while [ -n "$1" ] do f "$1" & shift done wait example usage: ./sleepsort.bash 5 3 6 3 6 3 1 4 7 2 Name: Anonymous : 2011-01-20 12:27 >>1 ãªãâ¦ã ã¨
ãããããã¤ã§ããã¼ãããçºãã¦ãã¨ãã¨ã¦ãçããã¾ãã 2014/2/25 追è¨: å ¨é¢çã«æ¸ãç´ãã¾ããã // https://github.com/norahiko/sort-visualize var helper = { range: function(min, max) { var res = []; for(var i = min; i < max; i++) { res.push(i); } return res; }, shuffle: function(ary) { for(var i = ary.length - 1; 0 <= i; i--) { var rnd = Math.random() * (i + 1) | 0; helper.swap(ary, i, rnd); } }, swap: function(ary, a, b) { if(a < 0 ||
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}