>_
majority_element.kt
Kotlin 2.4
Not run yet

+ 7 hidden

Input
nums = [4, 7, 4, 4, 2]
Expected
4

4 sits at three of the five positions, and three is more than half of five.