Driver function to check for above functions
let arr = [ 0 , 1 , 1 , 0 , 1 , 2 , 1 , 2 , 0 , 0 , 0 , 1 ] ; let arr_size = arr . length ; sort012 ( arr , arr_size ) ; document . write ( " " ) printArray ( arr , arr_size ) ;