Recursive DFS visiting left, then root, then right. See how in-order produces sorted output for BSTs.