# lec28 - Binary Tries(continued split(k Similar to split...

• Notes
• 36

This preview shows pages 1–12. Sign up to view the full content.

Binary Tries (continued) split(k) . Similar to split algorithm for unbalanced binary search trees. Construct S and B on way down the trie. Follow with a backward cleanup pass over the constructed S and B .

This preview has intentionally blurred sections. Sign up to view the full version.

Forward Pass Suppose you are at node x , which is at level j of the input trie. a x b If bit j of k is 1 , move to root of b and add a to level j of S and to level j of B .
Forward Pass If bit j of k is 0 , move to root of a and add and b to level j of B to level j of S . a x b

This preview has intentionally blurred sections. Sign up to view the full version.

Forward Pass Example b a c d e f g S = null B = null k = g.key = 101011
Forward Pass Example b c d e f g a S B k = g.key = 101011

This preview has intentionally blurred sections. Sign up to view the full version.

Forward Pass Example c d e f g B b a S k = g.key = 101011
Forward Pass Example d e f g a S c b B k = g.key = 101011

This preview has intentionally blurred sections. Sign up to view the full version.

Forward Pass Example c a S d b B e f g k = g.key = 101011
Forward Pass Example f g c a S e d b B k = g.key = 101011

This preview has intentionally blurred sections. Sign up to view the full version.

k = g.key = 101011 Forward Pass Example d b B e c a S f
Backward Cleanup Pass Retrace path from current nodes in S and B toward roots of respective tries.

This preview has intentionally blurred sections. Sign up to view the full version.

This is the end of the preview. Sign up to access the rest of the document.
• Spring '10
• sartajsahani
• Radix tree, #branch, 0 3 0 0001 1 0011 4 0 1000 1 1001 0 4 0 1100 1 1101 1 1 2 1 bit

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern