## optimal binary search tree program in java

import java.io.*; import java.util.*; class Optimal { public int p[]; // Probabilities with which we search for an element public int q[]; // Probabilities that an element is not found public int a[]; //...