- 공부이야기
- 2009/01/18 01:29
'Introduction to Algorithms(CLR)' 8장에 나오는 계수 정렬(Counting Sort)를 루비로 구현해 봤다.
def counting_sort(input, output, k)
temp = Array.new(k+1, 0)
length = input.size - 1
(0..length).each {| i | t...
1


최근 덧글