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.
1 parent fb92b90 commit d5a7b02Copy full SHA for d5a7b02
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