Loop to print the K smallest Leaf nodes of the array
for i in range ( k ) : NEW_LINE INDENT if ( i < len ( arr ) ) : NEW_LINE INDENT print ( arr [ i ] , end = " ▁ " ) NEW_LINE DEDENT else : NEW_LINE INDENT break NEW_LINE DEDENT DEDENT