Question: Write a java method constructTree which constructs an optimal BST given a table holding root node information, as returned by dynammic solution of optimal binary
Write a java method constructTree which constructs an optimal BST given a table holding root node information, as returned by dynammic solution of optimal binary search tree in this link https://www.geeksforgeeks.org/optimal-binary-search-tree-dp-24/. I modified the optimalSearchTree method that now in the 2d array it holds object that contain cost and key of the root for every subproblem.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
