Given an array of integers and a number k, the majority number is the number that occurs more than 1/k of the size of the array. Find it. Have you met this question in a real interview? Yes Example Given [3,1,2,3,2,3,3,4,4,4] and k=3, return 3. Note…