Function comp_sci::remove_duplicates_with_dual_pointers [-]  [+] [src]

pub fn remove_duplicates_with_dual_pointers<'a, A: PartialEq>(data: &'a mut Vec<A>)

Removes duplicate entries from Vec with a complexity of O(n(n+1)/2).

It is based on the dual pointer technique where ´current´ iterates as usual, but ´runner´ iterates until it hits the ´current´, and then ´current´ proceeds.