Splitting a Matrix of Linked Lists

This is a discussion on Splitting a Matrix of Linked Lists within the C Programming forums, part of the General Programming Boards category; So I have a square matrix composed of several linked lists, all containing random integers.
The data diagram looks like ...

As for the code you've posted, the comments "// Local Definitions" and "// Statements" are ridiculous. When you write comments, you should assume that the person reading your program actually knows the language!

As for your question, it's hard to understand how you've written this code but can't do the relatively simple task of splitting the matrix. At any rate, you need to make an attempt. So give the split function a try and post just that function.

The two parts do seem to work individually. Unfortunately, the first part modifies the lists of matrix in such a way that the second part won't work afterwards. You need to try to combine them into one pass, all in the same loop.

The two parts do seem to work individually. Unfortunately, the first part modifies the lists of matrix in such a way that the second part won't work afterwards. You need to try to combine them into one pass, all in the same loop.

I've had a few days to dabble in this and unfortunately procrastination got the best of me. I tried combining the two bits in the same loop but all to no avail..

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? 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.