Skip to content

Bug Report for find-duplicate-integer #4420

@hxxpn

Description

@hxxpn

Bug Report for https://neetcode.io/problems/find-duplicate-integer

Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.

It is not a bug but rather a bad test case given definition of this task

Task:
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.

Issue:
Every integer in the range [1, n] appears exactly once, but I got a test case [3,3,3,3,3] which violates the problem statement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions