Frequency of a number in array less than bigo n time : Find the frequency of a number in array in less than bigo n time
Array 1,2,2,3,4,5,5,5,2
Input 5
Output 3
Array 1,1,1,1,
Input 1
Output 4

Keep in mind less than bigo n

Thanks