Added check array items range for bucket sort.