Skip to content

Instantly share code, notes, and snippets.

@sudo-panda
Created August 11, 2020 16:46
Show Gist options
  • Select an option

  • Save sudo-panda/569415ec415cb6d155b4f396099f9c8b to your computer and use it in GitHub Desktop.

Select an option

Save sudo-panda/569415ec415cb6d155b4f396099f9c8b to your computer and use it in GitHub Desktop.
C++ tips to get around TLE : erase_if() with is_zero() predicate
v.erase(std::remove_if(v.begin(), v.end(), is_zero), v.end());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment