AlgoMaster Logo

Kth Smallest Element in a BST

tree=[3, 1, 4, null, 2],k=1
0 / 9
3142k = 1stacksortedinorder visits BST values in ascending order
algomaster.io
Step:Start: the 1st node visited in inorder is the 1st smallest