Quick Overview

Find the smallest positive integer missing from an unsorted list that may contain negatives, zeros, duplicates and very large values. Tests careful edge-case handling and meeting a linear-time, constant-extra-space target on inputs of up to 100,000 elements.

Smallest Missing Positive Integer in Linear Time and Constant Extra Space

Company: Google

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Technical Screen

Overview: Find the smallest positive integer missing from an unsorted list that may contain negatives, zeros, duplicates and very large values. Tests careful edge-case handling and meeting a linear-time, constant-extra-space target on inputs of up to 100,000 elements.

Read the full Google Software Engineer interview experience this question came from

Loading…