+ 4
In 'Allocate' function you're allocating the size of the pointer not the structure. It should be (Node*)malloc(sizeof(Node)).
+ 1
I tried using 1 1 8 and it seems to work fine. Can you be more specific about the error and the input that you used to produce it?
0
Well spotted Tiba
0
The reason is, that the while loop in line 78 finishes one too early. You can fix that easily setting 'while(temp)' in line 78.