1.

Let n = 4 and (a1, a2, a3, a4) = (do, if, int, while).Let p(1 : 4) = (3 / 8, 3 / 8, 1 /8, 1 / 8) and Let q(1 : 4) = (2 / 8, 3 / 8, 1 / 8, 1 / 8, 1 / 8) where p(i) and q(i) denotes the probability with which we search a and the identifier x being searched satisfy ai < x < ai + 1 respectively. The optimal search tree is given by:(1)(2)(3)(4)(A) (1)(B) (2)(C) (3)(D) (3)

Answer»


Discussion

No Comment Found

Related InterviewSolutions