Pergunta de entrevista da empresa Nagarro

Write a program to find the element of an array that occurs more than half array’s size. Input : {1,3,2,1,3} Output: 3