← All problemsSign in

Simple Permutation

As the CodeChef coding club of GLA University is going to organise a 3 day long coding event,so while setting a problem for the contest they face problem in solving this question. So your task is to help them with this problem. You have an array whose values are either $-1$ or an integer lie in the range $1$ and $2N(inclusively)$. Every integer other than $-1$ is appearing not more than $1$ time(

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start