Re: Sorting Counting Output
example:
'If your data were saved in Num() array;
dim hs as new hashtable
for i as integer=0 to 3000000-1
if not hs.containkey(num(i)) then hs.add(num(i),0)
hs(num(i).value = ctype(hs(num(i)).value, integer)+1
next
dim ary as new arraylist
for each de in hs
if ctype(de.value)>0 then ary.add(de.key)
next
ary.sort()
'output
dim outputStr as new stringbuilder()
for i as integer=0 to ary.length-1
outputStr.append(ary(i).tostring() & " : " & ctype(hs(ary(i)).value, integer) & " records" & controlchars.cr)
next
---------------------------
Sabrina Gage