← All problemsSign in

Find the Element

Given an array, find the element which appears more than half of the size of array, and if there is no element found return None. Input Format First line contains the size of the array n Constraints 1 ≤ n ≤ 10000 Output Format Print the Element if found , else print None Sample Input 1 9 3 3 4 2 4 4 2 4 4 Sample Output 1 4 Explanation 1 4 comes 5 times which is greater the ha

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start