histogram and mode b[a[i]] = b[a[i]] + (++cntr);