Lesson 8: Leader

The leader of sequence is the element whose value occurs more than half times.

Open reading material (PDF)

Dominator

Find an index of an array such that its value occurs at more than half of indices in the array.

Difficulty Level: Easy

EquiLeader

Find the index S such that the leaders of the sequences A[0], A[1], ..., A[S] and A[S + 1], A[S + 2], ..., A[N - 1] are the same.

Difficulty Level: Easy