based on the majority element appears more than [n/2] times.