Pregunta de entrevista de PayPal

reverse Linked List

Respuestas de entrevistas

Anónimo

3 abr 2012

gave a recursive solution, but was not satisfied with my answer

Anónimo

20 mar 2016

ListNode reverse(ListNode head) { ListNode newHead = null; while(head != null) { ListNode nextNode = head.next; head.next = newHead; newHead = head; head = nextNode; } return newHead; }