Problem Description

Task: assume there is a majority element (> n/2). Return it using O(1) space.

Input Format

Java method

Output Format

Return value

Constraints

Assume majority always exists.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next