Skip to content

Bug Report for subarray-sum-equals-k #5241

@AYM1607

Description

@AYM1607

Bug Report for https://neetcode.io/problems/subarray-sum-equals-k

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

The optimal O(n) solution (coded in Go) fails one of the test cases with an "empty" output:

Image

I presume this is because the program is being killed before it has a chance to finish (experience with other Go submissions in the past). But this is literally a re-implementation of the given solution with different variable names. For the record, I also tried the provided solution verbatim and it didn't pass.

I think the timeout for this problem has to be tuned. Even my initial O(n^2) attempt was accepted on LeetCode, but as not accepted on neetcode.

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