PayPal Interview Question

In depth resume questions Given an array of integers, find the highest occurring integer. Given that there are multiple integers with the same amount of max occurrences, determine the shortest substring inside the original array where you will have the same amount of integers. Return the shorter substring between those numbers. Pretty simple, could take a bit of code depending on approach.