Skip to content

Commit 79555bb

Browse files
author
Christian Encarnacion
committed
Update ReadMe.md
1 parent 6cbc877 commit 79555bb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Trie/ReadMe.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,24 @@ Let's walk through the algorithm:
6161
else
6262
6363
for each character in key
64+
if child node with value character does not exist
65+
break
66+
else
67+
node = child node with value character
68+
decrement length
6469
70+
if length != 0
71+
let suffix be the remaining characters in the key defined by the shortened length
72+
73+
for each character in suffix
74+
create a new node with value character and let it be the child of node
75+
node = newly created child now
76+
mark node as a valid key
77+
else
78+
mark node as valid key
79+
80+
81+
6582
6683
6784
```

0 commit comments

Comments
 (0)