Loading...
Engaged employer
reverse Linked List
Anonymous
gave a recursive solution, but was not satisfied with my answer
ListNode reverse(ListNode head) { ListNode newHead = null; while(head != null) { ListNode nextNode = head.next; head.next = newHead; newHead = head; head = nextNode; } return newHead; }
Check out your Company Bowl for anonymous work chats.
Get actionable career advice tailored to you by joining more bowls.
Stay ahead in opportunities and insider tips by following your dream companies.
Get personalised job recommendations and updates by starting your searches.