Reversing linked list, Print circle pattern, deadlock
Anonymous
Reversing a linkedList: Node reverse(Node head) { Node prev=null; Node next=null; Node cur=head; while(cur!=null) { next=cur.next; cur.next=prev; prev=cur; cur=next; } return prev; }
Check out your Company Bowl for anonymous work chats.