Find repeating and missing number

Опубликовано: 02 Апрель 2026
на канале: Ritambhara Coding and System Design Interviews
5,981
62

Given an array of n integers. The array contains integers from 1 to n. One (and exactly one) integer is repeating in the array and one integer (from 1 to n) is missing. Find the missing and repeating number.
--------------------------
Join our 30-days online course to prepare for coding interviews of companies like Google, Amazon, Facebook, Microsoft, etc.

Course On Coding: http://www.ritambhara.in/big-o/
Course On System Design: http://www.ritambhara.in/system-desig...

Call: +91-8377803450
Email: [email protected]

Call us to conduct a workshop in your college campus.

Buy our books and prepare for coding interviews on your own.
https://www.amazon.in/Kamal-Rawat/e/B...

For detailed discussions on Interview Questions visit:
http://www.ritambhara.in/