Code Challenge - First Missing Positive Integer

Опубликовано: 18 Ноябрь 2024
на канале: veganaiZe
23
0

www.dailycodingproblem.com #4 [Hard]: "Given an array of integers, find the first missing positive integer in linear time and constant space. In other words, find the lowest positive integer that does not exist in the array. The array can contain duplicates and negative numbers as well."

O(n) time / O(1) space -- iterative and recursive solutions!