So this doesn't work for array with duplicate values. like {1,1,1,1,1} and {1,1,1,1,1}