Skip to content

Bug Report for last-stone-weight #4376

@nrbagora

Description

@nrbagora

Bug Report for https://neetcode.io/problems/last-stone-weight

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

Input: stones = [2,3,6,2,4]

Output: 1
Explanation:
We smash 6 and 4 and are left with a 2, so the array becomes [2,3,2,2].
We smash 3 and 2 and are left with a 1, so the array becomes [1,2,2].
We smash 2 and 2, so the array becomes [1].

The answer here should be 2. There is no 1 in the array.

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