Find the Frequency
Easy Accuracy: 59.34% Submissions: 21745 Points: 2

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 is to complete the function findFrequency() which should count the frequency of X and return it.

We are replacing the old Disqus forum with the new Discussions section given below.