akanksha-raghav / Hacktoberfest2021

Hacktoberfest® is open to everyone in the global community. Make your first PR! ~ A beginner-friendly repository made specifically for open source beginners.
MIT License
34 stars 138 forks source link

Optimized solution for finding duplicates in array #253

Open shresth12-jain opened 2 years ago

shresth12-jain commented 2 years ago

You have been given an integer array/list(ARR) of size N which contains numbers from 0 to (N - 2). Each number is present at least once. That is, if N = 5, the array/list constitutes values ranging from 0 to 3, and among these, there is a single integer value that is present twice. You need to find and return that duplicate number present in the array.

akanksha-raghav commented 2 years ago

@shresth12-jain add your program to programs folder