ThePrimeagen / kata-machine

1.28k stars 1.27k forks source link

test: Expand Trie.ts coverage #51

Open MarcosTypeAP opened 1 year ago

MarcosTypeAP commented 1 year ago

I created a Trie that passes the tests, but when I delete a word that forms an entire branch (where the last node is a leaf), it starts deleting nodes with only one child until it finds a node with more children, instead of stopping when it reaches a node indicating the end of a word.