You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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
The text was updated successfully, but these errors were encountered: