Missing and Repeating Problem
Missing and Repeating Problem — ExecCode Easy DSA Practice
Solve the Missing and Repeating 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 Missing and Repeating. Your task is to compute the required answer and return repeating then missing value. n, then n integers.
Examples
Input {"nums": [1, 2, 2, 4, 5]}; Output 2 3. Input {"nums": [1, 3, 3]}; Output 3 2. Input {"nums": [1, 2, 4, 4]}; Output 4 3
Constraints
Exactly one repeat and one gap in 1..n
Practice Missing and Repeating free on ExecCode. Browse DSA problems, topic map, and placement guides.