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


Write a function that takes "depth" as argument and return
sum of node's data of that depth.

For instance,

(0) depth 0
/ \
(10) (20) depth 1
/ \
(40) (50) depth2

If I pass get_sum_by_depth(2) ,

it would return 90 (i.e. 40 + 50 )


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

Post New Answer

More PHP Interview Questions

Does not want to see PHPSESSID in the url. How can be done this ?

3 Answers  


What is the function file_get_contents() usefull for?

0 Answers  


Write a program using while loop?

0 Answers  


What is the use of final class in php?

0 Answers  


Why many companies are switching their current business language to php?

0 Answers  


How to generate pdf file in php?

1 Answers  


What is php.ini & .htacess file?

0 Answers  


What are the different components used in php for formatting?

0 Answers  


How many ways to include array elements in double-quoted strings using php?

0 Answers  


What is session management php?

0 Answers  


What is a php class?

0 Answers  


Tell me how can we connect to a mysql database from a php script?

0 Answers  


Categories