20 / \ 8 22 / \ 4 12 / \ 10 14
Node root = null ; root = insert ( root , 20 ) ; root = insert ( root , 8 ) ; root = insert ( root , 4 ) ; root = insert ( root , 12 ) ; root = insert ( root , 10 ) ; root = insert ( root , 14 ) ; root = insert ( root , 22 ) ; int k = 3 ; ksmallestElementSum ( root , k ) ; System . out . println ( temp_sum ) ; } }