(function(){ window.OpenPopKa = true;}())

Given a BST, write a recursive function BSTsmallcount that, given a key value, returns the number of nodes having values less than the key. Your function should visit as few nodes in the BST as possible.

[editor.getValue()]
if (guess[0] != initEditor) { console.log(guess[0]); window.codeValue = guess[0]; window.progexType= "BTRecurTutor"; window.summexName= "BSTsmallcountPROG"; } else { return ""; }

This is simpler than the "range" example.

If the root is greater than or equal to "key", then there is no reason to visit the right subtree.

You always have to visit the left subtree. Even if the root has a big value, something small could be in the left subtree.