Hi Casey,<br><br>Thanks very much for your zeal.<br><br>The table is a csv file. Actually the number of rows can be sixty thousand.<br><br>Hong<br><br><div class="gmail_quote">On Fri, Nov 13, 2009 at 5:08 PM, Casey Hawthorne <span dir="ltr">&lt;<a href="mailto:caseyh@istar.ca">caseyh@istar.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Sorry, I forgot to ask an important question.<br>
<br>
Is the table stored<br>
in a dense format as in complete rows and complete columns<br>
or<br>
in a sparse table format?<br>
<div><div></div><div class="h5"><br>
<br>
&gt;The question is more about algorithm than Haskell. But I am going to code in Haskell which I am still learning.<br>
<br>
&gt;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).<br>
<br>
&gt;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.<br>

<br>
&gt;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.<br>
<br>
</div></div>--<br>
Regards,<br>
<font color="#888888">Casey<br>
</font></blockquote></div><br>