
3 Sep
2003
3 Sep
'03
1:13 p.m.
How would one best (read: most efficiently) create a histogram in Haskell? More precisely, given a list of integers in a known range, I want a count of how often any given number occurs. In imperative languages this would be done by iterating over the list and updating the count for the element under consideration. Without updatable data structures, the most straightforward solution I can think of would start by sorting the list, but for a long list that is very inefficient. Any suggestions? Konrad.
7978
Age (days ago)
7978
Last active (days ago)
1 comments
2 participants
participants (2)
-
Ferenc Wagner
-
Konrad Hinsen