Microsoft interview question

Remove duplicated nodes from a linked list

Interview Answer

Anonymous

23 Mar 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!!!!