get the k the element in a binary search tree