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 ãªãâ¦ã ã¨
{{#tags}}- {{label}}
{{/tags}}