Printable View
Quote: Originally Posted by Djsarkar In beginning Both Head and Tail point to next node in list. How to write code for this in function It is as easy as it sounds. Make them point to the same address. Code: ListNode *node = malloc(sizeof(ListNode)); List->Head = node; List->Tail = node;
ListNode *node = malloc(sizeof(ListNode)); List->Head = node; List->Tail = node;