Skip to content

Instantly share code, notes, and snippets.

@swapnil-warke
Created October 8, 2013 05:40
Show Gist options
  • Save swapnil-warke/6879969 to your computer and use it in GitHub Desktop.
Save swapnil-warke/6879969 to your computer and use it in GitHub Desktop.
Stl hint
template <typename T>
void remove_duplicates(std::vector<T>& vec)
{
std::sort(vec.begin(), vec.end());
vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment