Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

int jumping()

{
struct Node *p = head;
srtuct Node *q;
while(p!=NULL)
{
for(int i = 0;i<M;i++)
{
q = p;
p = p->next;
}
if(p->next!=NULL)
{
q->next = p->next;
free(p);

}
else
{
q->next = NULL;
free(p);
}

You might also like