DAYS
HOUR
MINS
SEC
Error
Given a vector of N positive integers and an integer X. The task is to find the frequency of X in vector.
Example 1:
Input:
N = 5
vector = {1, 1, 1, 1, 1}
X = 1
Output:
5
Explanation: Frequency of 1 is 5.
Your Task:
Your task is to complete the function findFrequency() which should count the frequency of X and return it.
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Yes