write a program to input an array of n elements and find the frequency of the number that is yo be searched
Answers
Answered by
2
Answer:
Run an inner loop from i + 1 to size . The loop structure should look like for(j = i + 1; j < N; j++) . Inside inner loop, if duplicate element is found increment the frequency count of current array element. Which is if(arr[i] == arr[j]) then count++ .
Similar questions
Computer Science,
4 months ago
English,
4 months ago
Math,
4 months ago
English,
9 months ago
Geography,
9 months ago
Math,
1 year ago
Math,
1 year ago
Social Sciences,
1 year ago