cpp implementation of First Missing Positive Integer