On two occasions I have been asked [by members of Parliament]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. Charles Babbage

Optimal Binary search tree

Language Java | Level Intermediate | Category Algorithms | August 4, 2015 9:02 am

Algorithm Problem Description

Optimal binary search tree can be static or dynamic. The tree cannot be modified in static optimality. The tree can be modified any time in the dynamic optimality. The tree can be rotated in the dynamic problem. Binary search tree is a binary search tree which provides the smallest possible search time for a given sequence of accesses.

Write a program to implement optimal binary search tree


Number of identifiers: 3
Identifiers: [null, 1, 2, 3, null]
Success probability for identifiers: [0, 4, 5, 6, 0]
Failure probability for identifiers: [6, 7, 8, 9, 0]
Tree in pre order: 2 1 3          	        


Please login to add comments.