Driver code
public static void main ( String [ ] args ) { int arr [ ] = { 2 , 0 , 1 , 4 , 5 , 3 } ; int n = arr . length ; System . out . println ( " Given ▁ array ▁ is ▁ : ▁ " ) ; printArray ( arr , n ) ; rearrange ( arr , n ) ; System . out . println ( " Modified ▁ array ▁ is ▁ : " ) ; printArray ( arr , n ) ; } }