Driver code
k = 3 NEW_LINE arr = [ 2 , 6 , 3 , 12 , 56 , 8 ] NEW_LINE n = len ( arr ) NEW_LINE sortK ( arr , n , k ) NEW_LINE print ( " Following ▁ is ▁ sorted ▁ array " ) NEW_LINE printArray ( arr , n ) NEW_LINE