style: use getOrDefault in MajorityElement
#5455
+1
−2
Merged