Run Code  | Code Wall  | Users  | Misc  | Feedback  | About  | Login  | Theme  | Privacy 

Balanced Insert Heap Example

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 1.05 sec, absolute running time: 0.21 sec, cpu time: 0.13 sec, memory peak: 3 Mb, absolute service time: 1,27 sec 
edit mode |  history  | discussion
*** Tree Example Program for ECE 2574 ***

Inserted value 1 and new height = 2 Optimal Tree Height = 2 Tree size = 2 Ratio = 1
Inserted value 2 and new height = 2 Optimal Tree Height = 2 Tree size = 3 Ratio = 1

Max ratio of tree height to optimal tree height = 1

Height of tree is 2