Skip to content

Commit

Permalink
improve implementation comment in radix package
Browse files Browse the repository at this point in the history
  • Loading branch information
jub0bs committed May 19, 2024
1 parent a9685e8 commit c569a6b
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions internal/origins/radix/radix.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,13 @@ func (t *Tree) Insert(keyPattern string, v int) {
}

// child.suf is NOT a suffix of s; we need to split child.
// Before splitting: child
//
// Before splitting:
// After splitting: child' -- grandChild1
//
// child
//
// After splitting:
//
// child' -- grandChild1
//
// or perhaps
//
// child' -- grandChild1
// \
// grandChild2
// ... or perhaps child' -- grandChild1
// \
// grandChild2

// Create the first grandchild on the basis of the current child.
grandChild1 := child
Expand Down

0 comments on commit c569a6b

Please sign in to comment.