Programming in C; Functions, Recursion, Parameter passing, Scope, Binding; Abstract data types, Arrays, Stacks, Queues, Linked Lists, Trees, Binary search trees, Binary heaps.


Postby mhhjthjt » Sat Nov 08, 2014 3:07 pm

Suppose an initially empty binary search tree.
In how many ways numbers from 1 to 7 can be inserted into the below BST

Posts: 17
Joined: Mon Oct 14, 2013 12:57 pm
My College/Company:: _
Roll Number: 0


Postby Unnikuttan » Fri Dec 05, 2014 3:20 pm

BST is ordered...

for a BST

left node < root node
right node > root node.

so we can have two options here(by changing he above rule for numbers between 1-7)...

so there are two trees possible.

please verify..

Gatementor Senior Member
Gatementor Senior Member
Posts: 498
Joined: Fri Jun 28, 2013 4:34 pm
My College/Company:: CUSAT
Roll Number: 9999999

Return to Programming and Data Structures

Who is online

Users browsing this forum: No registered users and 3 guests