Skip to content

Bug Report for remove-duplicates-from-sorted-array #4099

@hjames12

Description

@hjames12

Bug Report for https://neetcode.io/problems/remove-duplicates-from-sorted-array

If an out-of-bounds exception is thrown, then the two text cases from hitting run pass.

int current = 1; for(int i = 1; i <= nums.length; i++){ if(!(nums[i] == nums[current])){ nums[current] = nums[i]; current++; } } return current; }
Plug that code into the problem and hit run to see it.

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