
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Notes; Professor: Sloan; Class: Data Structures; Subject: Computer Science; University: Wofford College; Term: Fall 2008;
Typology: Study notes
1 / 1
This page cannot be seen from the preview
Don't miss anything!
Week 10, Class 28: Wednesday, November 5, 2008 Today we talked briefly about testing a sort routine for stability by using a dataset composed of tuples and the sorting only on the first item using something like: def newCmp(tuple1, tuple2): return cmp(tuple1[0],tuple2[0]) Next, we discussed an ADT for a priority queue and went over the algorithms for building, removing the root, and removing an arbitrary node. The key to removal is restore completeness first, then the heap property by bubbling nodes. Finally, we talked briefly about the ideas behind skip lists. Homework for Friday: For the data: 5,1,9,3,7,2,4, a) Show the BST & heap tree b) Show each after deleting 7 c) Show each after deleting