Pergunta de entrevista da empresa Microsoft

Recursively reverse a singly linked list.

Respostas da entrevista

Sigiloso

19 de nov. de 2009

Just gave this a shot. void reverse(Node node, Node previous){ Node next = node->next; node->next = previous; //point to previous node if(next != null) { reverse(next, node); } }

Sigiloso

1 de out. de 2011

My fav :)

Sigiloso

25 de mai. de 2019

Stand up and walk backwards out of the interview room.

Sigiloso

21 de mar. de 2009

The difficulty was not so much in the question but in the on the spot nature without much time.