Order of test calls in C version don't match the instructions?

Per the instructions, this is the order of the functions called:

new/create MyLinkedList();
addAtHead(1);
addAtTail(3);
addAtIndex(1, 2); 
get(1);          
deleteAtIndex(1); 
get(1);          

I was not getting things to pass, so I put printf's in the functions
to see what was being called and when, and this is the order:

new/Create()
addAtHead(1);
addAtTail(3);
addAtTail(2);
getAtIndex(1)
delAtIndex(1)
getAtIndex(1)
delete/Free() 

I won't rule out a mistake on my part, but it seems the C test is incorrect?

Thanks for your time.

Comments (0)