I m trying to do this this :
-
firstly try to store the curnode as the kth elements and a temp for the cur->next for second sublist.
-
how to get the previous node for the first sublist like
we have 9->5->1
i have write a loop to make the current as the 1 know i am not able to understand how to make 1->5 . Or do we have to do the same things like done in reverse a list video where the first element points to null after reversing.