Solved LeetCode program · 200 of 1,000
#0230 · Kth Smallest Element in a BST
Original English source
Keep a shared values holding 3, 1, 4, and 2. Keep a shared lefts holding 1, -1, -1, and -1. Keep a shared rights holding 2, 3, -1, and -1. Keep a shared order as an empty list of whole numbers.
To gather from node (a whole number). If node is less than 0, return. Gather from item node of lefts. Place item node of values into order. Gather from item node of rights.
Gather from 0. The place is 0. Show item place of order.
Expected stdout
1