Question d’entretien chez Microsoft

Recursively reverse a singly linked list.

Réponses aux questions d'entretien

Utilisateur anonyme

19 nov. 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); } }

Utilisateur anonyme

1 oct. 2011

My fav :)

Utilisateur anonyme

25 mai 2019

Stand up and walk backwards out of the interview room.

Utilisateur anonyme

21 mars 2009

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