We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c377037 + d5a7b02 commit b122daaCopy full SHA for b122daa
public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md
@@ -35,13 +35,11 @@ The update and delete operations for radix tries can be defined as follows:
35
36
```
37
def update(node,path,value):
38
+ curnode = db.get(node) if node else [ NULL ] * 17
39
+ newnode = curnode.copy()
40
if path == '':
- curnode = db.get(node) if node else [ NULL ] * 17
- newnode = curnode.copy()
41
newnode[-1] = value
42
else:
43
44
45
newindex = update(curnode[path[0]],path[1:],value)
46
newnode[path[0]] = newindex
47
db.put(hash(newnode),newnode)
0 commit comments