Skip to content

Feedback on prefix trees #2

Description

@Anisha7

Great job on completing the prefix tree!

  • You can further challenge yourself by working on time and space complexities for each prefix tree method. You would be expected to do this in interviews, and it would be good practice :)
  • Your complete and size tests are failing. Are you checking for duplicate insert when updating your size property? For your complete function, make sure you are finding all words in your tree that complete the given prefix.
  • Your contains method is failing tests. This method should only be returning true for words that are in the tree and terminal.
  • Your strings method is failing tests. For test_strings, try adding print(tree_strings, input_strings) and see what is being added to both. It might give you some direction for debugging.

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