Question d’entretien chez Microsoft

Remove duplicated nodes from a linked list

Réponse à la question d'entretien

Utilisateur anonyme

23 mars 2019

i told him that i could solve it in O(n²) without using memory, so this was my first solution(go through every node to test if it's equal to the node i'm currently in) then i used a set to keep occurrences of the value of a node, if the current node is already on the set, it means it's duplicated, so i would remove it. check for corner cases!!!!