Smallest Positive Missing Problem

Smallest Positive Missing Problem — ExecCode Easy DSA Practice

Solve the Smallest Positive Missing problem on ExecCode. Free online easy DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Description You are given the input needed to solve Smallest Positive Missing. Your task is to compute the required answer and return smallest missing positive. n, then n integers.

Examples

Input {"nums": [1, 2, 0, -1, 3]}; Output 4. Input {"nums": [1, 1, 0, -1, -2]}; Output 2. Input {"nums": [1, 2, 3]}; Output 4

Constraints

O(n) time, O(1) space ideal

Practice Smallest Positive Missing free on ExecCode. Browse DSA problems, topic map, and placement guides.