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

What is list function with their uses.

0 Answers  


Does php pass arrays by reference?

0 Answers  


What is factory pattern in php?

0 Answers  


What is global variable php?

0 Answers  


How do you destroy a session?

0 Answers  


What is is_null() in php?

0 Answers  


How can cross site request forgery csrf be prevented?

0 Answers  


How can we know the number of days between two given dates using PHP?

8 Answers   AZTEC, HCL, Navsoft,


In how many ways we can retrieve the date in the result set of mysql using PHP?

5 Answers   Yahoo,


How long is a php session valid?

0 Answers  


Do you know what does $globals means?

0 Answers  


Explain me what is the goto statement useful for?

0 Answers  


Categories