• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
December 24, 2023 |1.4K Views
PROBLEM OF THE DAY : 23/12/2023 | Count More than n/k Occurrences
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Siddharth Hazra. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Arrays but also build up problem-solving skills.

In this problem, an array arr of size N and an element k. The task is to find the count of elements in the array that appear more than n/k times.

Example :

Input:
N = 8
arr = [3,1,2,2,1,2,3,3]
k = 4
Output: 
2
Explanation: 
In the given array, 3 and 2 are the only elements that appear more than n/k times.

Give the problem a try before going through the video. All the best!!!
Problem Link: https://practice.geeksforgeeks.org/problems/count-element-occurences/1