The search Tree ADT Binary Search Trees
Binary Search Trees
1. Definition
DefinitionA binary search tree is a binary tree. It may be
(1)
(2)
(3)
(4)
empty. If it is not empty, it satisfies the following properties:
Every node has a key which is an integer
Bonus 2: Jumping the Queue
Value: 3 Point
Time Limit: 1 Second
Memory Limit: 32768 KB
The beginning of a winter break near Spring Festival is always the beginning of a
peak period of transportation. If you have ever tried to get a train ticket at that tim
Programming Assignment # 1
Posted on Mon, Apr 25, due Mon, May 9
CS 130A Data Struc & Alg
Hashing is very useful if we are only interested in insert, delete, and find operations; e.g.,
delete (10) or insert (5) or find (100). But a hash table provides no
Project 2:
Binary Search Trees
This project requires you to implement operations on unbalanced binary search trees,
AVL trees, and splay trees. You are to analyze and compare the performances of a
sequence of insertions and deletions on these search tree
CHAPTER
5
PRIORITY QUEUES (HEAPS)
delete the element with the highest \ lowest priority
5.1 ADT Model
Objects: A finite ordered list with zero or more elements.
Operations:
PriorityQueue Initialize( int MaxElements );
void Insert( ElementType X, Priori
CHAPTER
5
PRIORITY QUEUES (HEAPS)
delete the element with the highest \ lowest priority
5.6 Leftist Heaps
1. Structure Property:
A structural property, an ordering property
Definition the null path length Npl(X) is the length of the shortest
path from a
fengyan@zju.edu.cn
TA: , simonq@zju.edu.cn
project :
ftp:/ds_student:ds_student@10.214.21.68
4.4 AVL Trees
Target : Speed up searching (with insertion
and deletion)
root
Tool : Binary search
trees
small
large
Problem : Although Tp = O( height ), but the
Bonus 3: Attack of Panda
Value: 4 Points
Time Limit: 3 Second
Memory Limit: 32768 KB
In 2007, a computer virus spread across networks in China. The virus came with
an icon of a lovely panda, hence the name Panda virus. What makes this virus difficult
to h
Bonus1: Web Browser Simulation
Value: 1 Point
Time Limit: 1 Second
Memory Limit: 32768 KB
Standard web browsers contain features to move backward and forward among the pages
recently visited. One way to implement these features is to use two stacks to kee