first element of k in a bst , iterative and recursive impementation