Driver Program
arr = [ 0 , 1 , 1 , 0 , 1 , 2 , 1 , 2 , 0 , 0 , 0 , 1 ] NEW_LINE arr_size = len ( arr ) NEW_LINE arr = sort012 ( arr , arr_size ) NEW_LINE print   " Array after segregation : NEW_LINE " , NEW_LINE printArray ( arr ) NEW_LINE