group rows of strings in two-dimensional arrays
<p>I have the following problem and any help would be appreciated. Let's assume we have the following  (n x 3) array:</p>

<pre><code>["Skyfall", "Monday", "21:00",
 "Batman Rises", "Wednesday", "22:30",
 "Skyfall", "Tuesday", "23:00",
 "The Avengers", "Thursday", "22:45",
 "Skyfall", "Monday", "21:00"
 "Batman Rises", "Wednesday", "22:30",
 "Batman Rises", "Wednesday", "22:00",
    .          .         .
    .          .         .
    .          .         .]
</code></pre>

<p>Each row is represented by three Strings. I want to implement an algorithm that is grouping common rows, in the following way.
When the algorithm starts it first checks all the values in the first column of the two dimensional array. Then if it finds same values there, it continues with the second column but it only checks the rows which have the same value in the first step. After that, it continues with the third column in the same motive. At the end it gives the rows that are found by the above procedure.
For example for the given array the output should be:   </p>

<p>["Skyfall", "Monday", "21:00",<br>
   "Batman Rises", "Wednesday", "22:30"]</p>

<p>Have you got any idea of how i could do that?
Thank you very much!</p>
