Skip to content

Bug Report for remove-element #5248

@prashant-thakur-dev

Description

@prashant-thakur-dev

Bug Report for https://neetcode.io/problems/remove-element

Example 1:

Input: nums = [1,1,2,3,4], val = 1

Output: [2,3,4] ------------------------------------------------------------------------------------->>>>>here output should be 3 instead of array
Explanation: You should return k = 3 as we have 3 elements which are not equal to val = 1.

Example 2:

Input: nums = [0,1,2,2,3,0,4,2], val = 2

Output: [0,1,3,0,4] ------------------------------------------------------------------------------------->>>>>here output should be 5 instead of array
Explanation: You should return k = 5 as we have 5 elements which are not equal to val = 2.

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