How pointer ptr2 should be setup to locate i th node?

4Comments
shivani @shivani1234
12 Aug 2017 02:12 pm

ptr2 should point to next of next of node so that when ptr2 traverses complete linked list , ptr1 will have traversed half of linked list , in that case it will traverse in [i/2] nodes.

set2018 @setgate
12 Aug 2017 03:33 pm

is it doubly linked list?

set2018 @setgate
12 Aug 2017 03:33 pm

is it doubly linked list?

shivani @shivani1234
12 Aug 2017 07:21 pm

it is not exactly double linked list , but a modified linked list.

Pages