


















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
Tree Data Structures, Binary Tree, Code for Simulation, Priority Queue, Recursive definition, Not a Tree, Binary Tree Terminology, Level of a Binary Tree Node, Complete Binary Tree are some of data structures topics and terms you will learn in these lecture slides.
Typology: Slides
1 / 26
This page cannot be seen from the preview
Don't miss anything!



















// print the final avaerage wait time. double avgWait = (totalTime1.0)/count; cout << "Total time: " << totalTime << endl; cout << “Customer: " << count << endl; cout << "Average wait: " << avgWait << endl;*
#include "Event.cpp" #define PQMAX 30 class PriorityQueue { public: PriorityQueue() { size = 0; rear = -1; }; ~PriorityQueue() {}; int full(void) { return ( size == PQMAX )? 1 : 0; };
int insert(Event e) { if( !full() ) { rear = rear+1; nodes[rear] = e; size = size + 1; sortElements(); // in ascending order return 1; } cout << "insert queue is full." << endl; return 0; }; int length() { return size; }; };*
Mohammad Aslam Khan Sohail Aslam Javed Aslam Yasmeen Aslam Haaris Saad Qasim Asim Fahd Ahmad Sara Omer
Left subtree I root Right subtree
Left subtree root
root Right subtree
root Right subtree Left subtree