Official algorithmic problem description and constraints.
You are given an array π of length 2π, consisting of each integer from 1
1 to π exactly twice.
You are also given an integer π (1β€πβ€βπ2β).
Detailed video explanations, mathematical intuition, and clean C++ implementation code.