Optimal binary search tree using dynamic programming in java

I have just finished up computing the average cost of an OBST and I know I computed it correctly.

java - printing optimal binary search tree in preorder dynamic programming algorith - Stack Overflow

My next task is to print the tree in preorder. I have an attempt at this using recursion but can't seem to shake the null pointer error.

Dynamic Programming - Optimal Binary Search Trees

Looks like you aren't checking your bounds correctly. If there is no left or right child, you shouldn't be printing that side.

By posting your answer, you agree to the privacy policy and terms of service. Stack Overflow Questions Developer Jobs Documentation beta Tags Users. Sign up or log in to customize your list.

Optimal binary search trees dynamic programming Workers and Jobs | Freelancer

Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us.

Log In Sign Up. Join the Stack Overflow Community.

optimal binary search tree using dynamic programming in java

Stack Overflow is a community of 7. Join them; it only takes a minute: Tshepang 5, 12 63 Jay Smith 1 Sign up or log in StackExchange.

optimal binary search tree using dynamic programming in java

Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.

optimal binary search tree using dynamic programming in java

Stack Overflow works best with JavaScript enabled. MathOverflow Mathematics Cross Validated stats Theoretical Computer Science Physics Chemistry Biology Computer Science Philosophy more 3. Meta Stack Exchange Stack Apps Area 51 Stack Overflow Talent.

Rating 4,3 stars - 430 reviews
inserted by FC2 system