Please review the sanity of test cases/main() code


My code was not working and so after a while, I decided to look at the solution. Turns out, I did exactly the same thing that was done in the solution but there was some error, tried pasting the exact solution on the editor but same error. Either my function does not return anything or there is a segmentation fault. Not sure about the exact error, but it seems that the first linked list is not getting created properly, I am encountering an incorrect length, even after using the exact same length function as the one provided in the solution.