notes47 - Note These notes cover the material on trees...

Note: These notes cover the material on trees, priority queues, and heaps discussed on Feb. 19, 21, and 23rd by lecturer Gustavo Rodriguez-Rivera.HTML and graphics by: Steven Maus ([email protected])Trees, Priority Queues, and Heaps!Trees- It is a data structure that reprensents a hierarchy.- When trees are well constructed [balance] lookup can take O(log(n))- A is the rootnode - B is the parentof D and E nodes- C is the siblingof B- D and E are the childrenof B- D, E, F, and G are externalnodes or leaves- A, B, and C are internalnodes- the depthor levelof E is 2 (distance of E to the root)- the heightof the tree is 3- the degreeof B (# of children) is 2Binary Trees- It is a tree with all internal nodes of degree equal to 2.Example of a binary tree

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

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.