[Haskell-cafe] looking for a good algorithm
hyangfji at gmail.com
Wed Nov 11 07:52:48 EST 2009
The question is more about algorithm than Haskell. But I am going to code in
Haskell which I am still learning.
Suppose I have a large table, with hundreds of columns and thousands of
rows. But not every cell has a value (of String, or Int, or Double type).
I want to shuffle the rows to maximize the number of columns whose first 100
rows have at least one number, given a list of preferred column names since
there is no guarantee that every number column will have at least one number
in its first 100 rows after shuffling.
Can someone provide a good algorithm for this problem? (I do not have any
background in algorithms.) You can assume I already know which columns are
of Int or Double type.
This is not a homework.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe