DOC PREVIEW
TRINITY CSCI 1321 - Binary Trees

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1Binary Trees3/29/20062Opening Discussion■Do you have any questions about the assignment?■Do you have any questions about the reading?3Sorted Binary Trees●One of the best uses of binary trees is the sorted binary tree. In this type of tree, we store data in every node and below any node we put lesser values to the left and greater values to the right.●We find elements by going down the tree always going left or right. This gives us behavior like a binary search, but the tree is more flexible because adds and removes are quite efficient as well.4Adding and Removing●The code for both adding and removing from a binary tree begins like a search that keeps track of previous (much like a linked list).–The add always goes to a leaf and adds the new element to the proper side.–The remove replaces the node we are removing with either the greatest node on the left or the smallest node on the right.5Coding■I want us to code a BST together. We'll have one of you code and I'll walk through the process. These are really neat data structures so you really should get a feel for how they work.6java.util.concurrent■While support of threading was built into the original version of Java, some common threading tasks still aren't easy.■There are some things that you find yourself doing rather frequently with threaded code and there are some limitations with the basic libraries that make it difficult to use at times.■The java.util.concurrent library was added to make common parallel tasks easier. It is built around a few key concepts. Let's go look at the javadocs for this library.7Minute Essay■What can go wrong with the type of binary tree that we wrote today to make it perform poorly?■Assignment #5 is due today unless you do the mock


View Full Document

TRINITY CSCI 1321 - Binary Trees

Documents in this Course
Recursion

Recursion

11 pages

Iterators

Iterators

10 pages

Actors

Actors

9 pages

Recursion

Recursion

15 pages

Recursion

Recursion

10 pages

Threads

Threads

7 pages

Trees

Trees

11 pages

Load more
Download Binary Trees
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Binary Trees and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Binary Trees 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?