A utility function to do inorder traversal of BST
function inorder ( root ) { if ( root != null ) { inorder ( root . left ) ; document . write ( root . key + " " + root . count + " " ) ; inorder ( root . right ) ; } }