While I can't see what purpose it has try this
pesdocode.
procedure COuntSingle (Binary Tree)
1. If Binary Tree Left = null
1.1 If Binary Tree right = null
1.1.1 return 0
ELSE
1.1.2 return 1 + CountChild(binarytree right)
ELSE
1.2 If Binary Tree right = null
1.2.1 return 1 + CountChild(binarytree left)
ELSE
1.1.2 return CountChild(binarytree left) +
CountChild(binarytree right)
Remember KISS - Keep it Simple Stupid. Especially in
If then else statements and recursion.
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ