get the majority element from a given array of integers containing duplicates
By CyberDude001 at Jun 28 2021