Pergunta de entrevista da empresa Salesforce

Write a function that takes an array of positive integers and returns the integer that is the majority in the array. If no one integer is the majority return -1.