1 / \ 2 3 / / \ 4 7 8
Node root = newNode ( 1 ) ; root . left = newNode ( 2 ) ; root . right = newNode ( 3 ) ; root . left . left = newNode ( 4 ) ; root . right . right = newNode ( 8 ) ; root . right . left = newNode ( 7 ) ; int k = 2 ; Console . WriteLine ( " Before ▁ swap ▁ node ▁ : " ) ; inorder ( root ) ; swapEveryKLevel ( root , k ) ; Console . WriteLine ( " STRNEWLINE After ▁ swap ▁ Node ▁ : " ) ; inorder ( root ) ; } }