First Missing Positive (Array Home) Problem

First Missing Positive (Array Home) Problem — ExecCode Hard DSA Practice

Solve the First Missing Positive (Array Home) problem on ExecCode. Free online hard DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.

Problem description

First Missing Positive (Array Home): Cyclic place positives then scan. For First Missing Positive (Array Home), focus on the exact input variables, return only the requested value, and preserve the required time complexity for the intended pattern.

Examples

Input nums = [3, 4, -1, 1]; Output 2

Constraints

1 ≤ n ≤ 10^5 Values fit in 32-bit ints

Practice First Missing Positive (Array Home) free on ExecCode. Browse DSA problems, topic map, and placement guides.