Create the binary tree by adding nodes to it
var root = newNode ( 2 ) ; root . left = newNode ( 1 ) ; root . right = newNode ( 9 ) ; root . left . left = newNode ( 10 ) ; root . left . right = newNode ( 5 ) ; var K = 5 ; document . write ( findCount ( root , K ) ) ;