http://pc11.2ch.net/test/read.cgi/tech/1174211797/l50 881 åå: ããã©ã«ãã®åç¡ããã Mail: sage æ稿æ¥: 2007/09/20(æ¨) 22:42:51 http://web.yl.is.s.u-tokyo.ac.jp/~ganat/memo/aboutHaskell.htmlã«ãã qsort [] = [] qsort (x:xs) = qsort elts_lt_x ++ [x] ++ qsort elts_greq_x where elts_lt_x = [y | y <- xs, y < x] elts_greq_x = [y | y <- xs, y >= x] ã¨ããã¯ã¤ãã¯ã½ã¼ãã§ãããããã®ã¡ã¢ãªæ¶è²»éã¯ããªã¹ãã®é·ããnã¨ããã¨ããO(n^2)ã«ãªããããªæ°ãããã®ã§ãããã©ãã§ããããã ã¾ãCã
{{#tags}}- {{label}}
{{/tags}}