Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Given a sequence of integers, there are a few sequences
which result in balanced
binary search trees i.e., AVL trees. Write a program that
takes a sequence of integers
as input and outputs the number of such sequences that
result in the balanced binary
search trees.
Input Format:
Single line contains sequence of integers terminated by -1.
Output format:
Print the number of AVL tree possible from that input sequence.
Sample Input:
1 2 3 -1
Sample Output:
2


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Puzzles Interview Questions

In one year there are 12 months,so how many years in one month

7 Answers  


what three specific job positions do you target from qatar airways group u.k?

0 Answers   Qatar Airlines,


why should we hire the others waiting to be interviewed?

0 Answers   Qatar Airlines,


A 3 digit number is such that it's unit digit is equal to the product of the other two digits which are prime. Also, the difference between it's reverse and itself is 396. What is the sum of the three digits?

4 Answers  


1. There are six columns of coins and there are eight coins in each column. One of the columns is entirely of fake coins and other five columns contain real coins. Weight of one fake coin is 1 gm more than the real coin which is 50 gm. How you can tell which column contains fake coin by single weight? 2.You want to purchase a two wheeler. You got three options from the counter. 1) Pay Rs. 40,400 on single payment 2) Pay Rs. 20,000 now and remaining by two equal annual installment of Rs. 11,600 3) Pay Rs. 15,000 now and remaining by three equal annual installment of Rs. 10,000 Which option is most attractive? (Take annual interest rate 9%)

4 Answers  


if 1+1 = 2 what will be 1-1 ? if 1+1 = 11 what will be 1-1 ? if 1+1 = 1 what will be 1-1 ?

12 Answers  


Write 1111......(243 times) i.e. a 243 digit number with all 1s. Prove that it is divisible by 243.

3 Answers  


Question asked in Infosys Campus Recruitment Held at Pragathi. On an iceland few customs are there .Men always speak truth, no women tells consecutive truth or false i.e. If first statement is true ,second is false and vice versa. same with children also. There was a family couple and a child. A passenger asked the child ?are you a boy or a girl? the boy spoke german. one of the parent said ? he is a boy? the other said ?he is a girl? ?he is lying?. (i)The kid is boy or girl (ii)who spoke the first mother/father

25 Answers   Infosys,


how many zeros are there at the end of product between 1 to 100

47 Answers   Infosys, SIP, TATA, Tech Mahindra, Vodafone,


Find a number which ends with digit 2 such that when you cut this last digit and paste it in the front of the number, the new number value is double that of original.

4 Answers  


How will you differentiate a 5 rupee(indian currency)or any five currency coin?Answer me how will you differentiate????? This question is asked in a college appitute test.Any one know help me plzzzzz!!!!!!!!!!!!!

2 Answers  


2. At a recent painting competition, jonneys rendition of a constable was not last. priya only just managed to avoid last place and came third. the lady who painted a monkey was very successful and took first place. mary beat the lady who painted the temple and the lady who painted the flower beat sachin. can you determine who painted what and who won?

1 Answers  


Categories