2.rotate K
2.rotate K
{
int data;
struct node *next;
}
*/
void rotate(struct node **h, int k)
{
if(h==NULL)
return ;
node *c=*h,*temp;
for(int i=1;i<=k;i++)
{
c=head;
temp=head;
while(c->next!=NULL)
{
c=c->next;
}
c->next=temp;
head=head->next;
temp->next=NULL;
}
}