ABC interview question

find kth smallest element in bst.