style: use getOrDefault in MajorityElement
#5454
+4
−8
Merged