Pergunta de entrevista da empresa DSV

Given an array of integers, find the first missing positive integer in linear time and constant space. For example, given [ 3 , 4 , − 1 , 1 ] [3,4,−1,1] the first missing positive integer is 2.