If array size is zero, MAX_SIZE is 32, the shift-overflow occured in AlignWithBegin function. n = MAX_SIZE - end; // end = 0, n = 32