Assignment4A - Assignment #4 Jennifer Kim 4 points 1. What...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment #4 Jennifer Kim 4 points 1.  What advantage do binary search trees have over linked lists?  Linked lists require O(N) operations to traverse the list while a binary search tree can store data  with most operations running in O(log N) time. 4 points 2.  What advantage do AVL trees have over binary search trees? AVL tree ensures O(logN) depth while binary search tree has an average depth of O(√N) and  can be N-1.  12 points 3.  For each traversal below, draw a different binary tree having one word per node such that  the sentence below is produced by:     a.  an inorder traversal  you /        \ Tommorrow do /        \ /        \ Leave         what can today /        \ Never             until     b.  a preorder traversal never /        \
Background image of page 1

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

View Full DocumentRight Arrow Icon
     leave can /        \ /        \ until         yesterday
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/07/2008 for the course CS 3345 taught by Professor Ozbirn during the Spring '08 term at University of Texas at Dallas, Richardson.

Page1 / 4

Assignment4A - Assignment #4 Jennifer Kim 4 points 1. What...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online