Coding Blocks IDE
Coding Blocks IDE
Coding Blocks Online IDE | Run and check your code
This is my code to reverse linked list by K nodes means if my LL is
push(head,4);
push(head,5);
push(head,8);
push(head,9);
push(head,3);
push(head,1);
push(head,2);
then reverse by K if K=3 then its giving 2 9 8 5 4 when it should give 3 1 2 9 8 5 4
Its not working . pls tell where its wrong