Home
Tutorials
Interviews/Topic
Interviews/Company
Resume Tips
Advertise/Contact us
skip to main
|
skip to sidebar
Program to determine the number of elements (or size) in a tree.
Solution:
int tree_size(struct node* node) {
if (node==NULL)
{
return(0);
}
else
{
return(tree_size(node->left) + tree_size(node->right) + 1);
} }
Newer Post
Older Post
Home
Subscribe Cinterviews.com
Click to send updates To Email
Subscribe in a reader
Topics
►
2021
(1)
►
June
(1)
►
2018
(4)
►
March
(4)
►
2014
(18)
►
July
(1)
►
June
(2)
►
May
(13)
►
January
(2)
►
2013
(121)
►
December
(48)
►
November
(71)
►
March
(2)
►
2012
(200)
►
November
(3)
►
October
(2)
►
September
(15)
►
June
(4)
►
May
(6)
►
April
(14)
►
March
(31)
►
February
(118)
►
January
(7)
▼
2011
(76)
▼
October
(15)
Solaris Certification exam questions
Mpls and vpn network interview questions
BGP networking Interview questions
Switching network interview Questions
Network routing interview questions
Tcp ip network interview questions
C and Cpp interview questions faqs
program to detect a loop in a linked list?
what pointer type for heterogeneous linked list?
C program to compare two linked lists?
Program to a copy of a linked list?
C program to find the depth or height of a tree?
Program to determine the number of elements (or si...
C program to delete a tree?
How to check if a binary tree is balanced?
►
June
(9)
►
May
(12)
►
April
(5)
►
March
(3)
►
February
(27)
►
January
(5)
►
2010
(979)
►
December
(40)
►
November
(69)
►
October
(173)
►
September
(58)
►
August
(92)
►
July
(90)
►
June
(50)
►
May
(65)
►
April
(84)
►
March
(178)
►
February
(71)
►
January
(9)
►
2009
(818)
►
December
(147)
►
November
(442)
►
October
(185)
►
September
(44)
►
2008
(1)
►
January
(1)