Skip to content

Canonical video solution does not pass checker for binary-tree-from-preorder-and-inorder-traversal #6131

Description

@mcmcgovern

Bug Report for https://neetcode.io/problems/binary-tree-from-preorder-and-inorder-traversal

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

Note: this is essentially a duplicate of this issue, but higher priority because in this case the video solution you provided trips up the excessive test cases.

Long story short: your test cases need to be better categorized based on the type of solution we are going for. If a user submits a correct brute-force, or otherwise non-optimal solution, it must be marked as a correct solution. When a solution like this does not pass the checker, it is a major malfunction of how things are supposed to work.

If the suite of test cases were to be split into a subset that can be passed, even in the brute force case, and also those that are only testing for the optimal solution this would allow users to better understand whether or not they are actually making progress with the problem. If the submission checker degrades into only passing for the optimal solution, it no longer accurately covers the scope of the problem.

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