Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To add Solution for "Find Duplicate Integer" Problem #209

Closed
Visha17 opened this issue Oct 2, 2024 · 2 comments
Closed

To add Solution for "Find Duplicate Integer" Problem #209

Visha17 opened this issue Oct 2, 2024 · 2 comments
Assignees
Labels
DSA Hacktoberfest contribute for hacktoberfest 2024

Comments

@Visha17
Copy link
Contributor

Visha17 commented Oct 2, 2024

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

@Saloni6111 Saloni6111 added Hacktoberfest contribute for hacktoberfest 2024 DSA labels Oct 2, 2024
@Saloni6111
Copy link
Owner

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

@Visha17
Copy link
Contributor Author

Visha17 commented Oct 2, 2024

Kindly accept my PR @Saloni6111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DSA Hacktoberfest contribute for hacktoberfest 2024
Projects
None yet
Development

No branches or pull requests

2 participants