[Solved] How to find the minimal missing integer in a list in an STL way
You can do this by building a set of integers and adding larger seen in the set, and holding the minimum not seen in as a counter. Once there is a number that is equal to the latter, go through the set removing elements until there is a missing integer. Please see below for implementation. … Read more