input: one two three
output: three two one
Say you are given a 2X2 board then number of squares are 5. Can someone help with the logic and sample program?
How can we count Number of Non Leaf Nodes of a given Tree ?
Example 40 /\ / \ 20 60 / \ \ 10 30 80 \ 90
Answer => 4