Closed Visha17 closed 1 month ago
This issue aims to add a coding problem titled "Find Duplicate Integer" along with its solution to the repository.
Problem Statement: You are given an array of integers nums containing n + 1 integers. Each integer in nums is in the range [1, n] inclusive.
Every integer appears exactly once, except for one integer which appears two or more times. Return the integer that appears more than once.
Example 1: Input: nums = [1, 2, 3, 2, 2] Output: 2 Example 2: Input: nums = [1, 2, 3, 4, 4] Output: 4 Constraints: 1 <= n <= 10000 nums.length == n + 1 1 <= nums[i] <= n Follow-up: Can you solve the problem without modifying the array nums and using O(1) extra space?
I would like to contribute to this repo under hacktoberfest, kindly assign me this issue
@Visha17 Assigned to you! Go ahead
Kindly accept my PR @Saloni6111
This issue aims to add a coding problem titled "Find Duplicate Integer" along with its solution to the repository.
Problem Statement: You are given an array of integers nums containing n + 1 integers. Each integer in nums is in the range [1, n] inclusive.
Every integer appears exactly once, except for one integer which appears two or more times. Return the integer that appears more than once.
Example 1: Input: nums = [1, 2, 3, 2, 2] Output: 2 Example 2: Input: nums = [1, 2, 3, 4, 4] Output: 4 Constraints: 1 <= n <= 10000 nums.length == n + 1 1 <= nums[i] <= n Follow-up: Can you solve the problem without modifying the array nums and using O(1) extra space?
I would like to contribute to this repo under hacktoberfest, kindly assign me this issue