History of Idiom 119 > diff from v39 to v40
Edit summary for version 40 by programming-idioms.org:
[Go] Big-O
[Go] Big-O
↷
Version 39
2018-04-11, 21:32:59
Version 40
2018-04-11, 21:34:44
Idiom #119 Deduplicate list
Remove duplicates from list x.
Explain if original order is preserved.
Idiom #119 Deduplicate list
Remove duplicates from list x.
Explain if original order is preserved.
Comments bubble
Iterate twice, from list to map, then from map to list.
Original order is preserved.
Comments bubble
T is the type of the items.
Iterate twice, from list to map, then from map to list.
This is O(n).