Find which element(x or y) has highest occurrence in the array
Given an array arr[] and the two elements x and y, the task is to find which element(x or y) has highest occurrence in the array. If the occurrences are the same, then return the smaller element. Examples: Input: arr[] = {1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5}; x = 4, y = 5;… Read More »
