Tag: firstmissingpositive

  • Find first missing positive integer in an array.

    Problem: Given an array of integers find the first missing positive integer . The first positive integer is 1. So if 1 is itself missing you need to return 1 else whatever number after 1 is missing that should be returned. For example, Given the array: [1,2,4,5] The output is 3 Given the array: [3,4,-1,1,5]…