Driver code
arr = [ 1 , 2 , 3 , 4 , 5 , 6 ] NEW_LINE n = len ( arr ) NEW_LINE print ( " Original ▁ Array " ) NEW_LINE print ( arr ) NEW_LINE print ( " Modified ▁ Array " ) NEW_LINE print ( rearrange ( arr , n ) ) NEW_LINE