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...


Binary tree question -

Node has numeric data (int)

The function takes depth as argument and sum all the value
of the node of the depth.

For instance,

(0) depth 0
/ \
10 20 depth 1
/ \ / \
40 50 60 70 depth 2

so if you pass get_sum(2), you would return 220 which is
40+50+60+70 (sum of depth2)

write the function.


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

Post New Answer

More PHP Interview Questions

Does php support multiple inheritance?

0 Answers  


What is the meaning of curl , which is used while connecting with pay pal? and how it works?

2 Answers  


What is the difference between for and foreach?

0 Answers  


What is difference between md5 and SHA256?

0 Answers  


how can I use bread crumb in PHP ?

2 Answers  


What is symfony php?

0 Answers  


What are the characteristics of php variables?

0 Answers  


How do you check if a variable has been set in php?

0 Answers  


How do you create an array in php?

0 Answers  


What is a stored procedure in mysql?

0 Answers  


Explain Type juggling?

0 Answers  


Explain the difference b/w static and dynamic websites?

0 Answers  


Categories