You are viewing a single comment's thread. Return to all comments →
u dont need these
if(llist == null) { llist = newNode; return llist; }
just -
newNode.next = llist; return newNode;
will do
Insert a node at the head of a linked list
You are viewing a single comment's thread. Return to all comments →
u dont need these
if(llist == null) {
llist = newNode; return llist;
}
just -
newNode.next = llist; return newNode;
will do