Skip to content

Bug Report for implement-prefix-tree #4744

@mendozajp

Description

@mendozajp

Bug Report for https://neetcode.io/problems/implement-prefix-tree

Forgive me if this is just a trick of the environment I'm too slow to understand, but I noticed when adding typing and optional variables in python for the TrieNode class, data from the previous test cases is not wiped away.
resulting in failing unit tests

Image

However when removing said args I have no problems.

Image

I never actually used those optional args as well, I had them there thinking I would, but never actually did, so some residual global being set doesnt seem to be the case. Somehow they were populating a new TrieNode object with data from previous test cases.

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