Question d’entretien chez Microsoft

Reverse a list

Réponse à la question d'entretien

Utilisateur anonyme

24 nov. 2010

public void ReverseList(NodeList node) { if (node == null) { return ; } NodeList prev = null; ; NodeList current = node; NodeList next = current.next; while (next != null) { next = current.next; current.next = prev; prev = current; current = next; } }