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 ãªãâ¦ã ã¨
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}