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

It comes once in a year and twice in a week what is that?

20 Answers   AJ Square Inc, HCL, Infosys,


I can take a bca student instead of you then why should i hire you

10 Answers  


Write Eleven Lakh,Eleven Thousand,Eleven Hundred,Eleven in figures.

15 Answers   Alard College, LIC, Nishant Mouldings, WinSoft,


1.At the recent web developres bowling match,two ganes were played.Kiev beat stuart in both games;also Richard beat John in both games.The winner in game1 second in game2.Richard won game2 and John beat stuart in game1.No player got the same placing twice.Can you determine who finished where in each game?

2 Answers   QA,


Your job is to create a simple sum that adds up to 12. You have to use the same number three times and you cannot use the number 4

45 Answers   TATA, TCS,


in a village 4000 people watch a tv.in which 1500 watch A channel.2000 watch B channel and 2500 watch C Channel.500 people watch A and B channel.800 watch A and C Channel.1000 watch B and C Cahnnel.find maximum people who watch maximum no of channels?

9 Answers   Siemens,


i want model paper on SBI Clerk post,plz sed previous papers

56 Answers   Abhyudaya Co-operative Bank, BMC, Clerical Jobs, JAS, Rohit Technologies, State Bank Of India SBI,


If 5/2 artists make 5/2 paintings using 5/2 canvases in 5/2 days then how many artists r required to make 25 paintings using 25 canvases in 25 days?

7 Answers  


Find out the smallest four digit number which is divisible from 1 to 10?

33 Answers   IBM, Infosys, TCS,


In a sports contest there were m medals awarded on n successive days (n > 1). 1. On the first day 1 medal and 1/7 of the remaining m - 1 medals were awarded. 2. On the second day 2 medals and 1/7 of the now remaining medals was awarded; and so on. 3. On the nth and last day, the remaining n medals were awarded. How many days did the contest last, and how many medals were awarded altogether?

2 Answers  


rich man keeps me in pocket, poor men throws me away, children eat me, am a tamil word _u_ _e_ _l

9 Answers   Adama Agricultural Solutions, Infosys, Mannar Company, Wipro,


4_4_4_4=22 use all sign of maths

0 Answers  


Categories