Quote Originally Posted by quzah View Post
So you want to turn a matrix into two linked lists?
Code:
A0 A1 A2 A3
B0 A4 A5 A6
B1 B2 A7 A8
B3 B4 B5 A9
B6 B7 B8 B9
Something like that? So all you need to do is keep track of what row and what column you are on, and based on that, append that node to the correct list. If the current column is greater than or equal to the row counter, put this node on list 1. Otherwise put it on list 2.

Something like that anyway.


Quzah.
Oh I see.. so maybe something like
Code:
void split( MATRIX *matrix , NODE **list_1, NODE **list_2)
{
    int r;
    
    for(r = 0; r < matrix->rows; r++)
    {
        if(node_column >= r)
            add to list_1;
        else
            add to list_2;
    }
    
    return;
    }