Marks :100
: 5 | : 0
You are given a array A of size N ($$$A_i,A_{i+1}.......A_{n-1}$$$).
You can perform the following operation as many times as you want :
Select an integer X and add it to each element of the Array.
You are also given the integer Y. Your task is to return the maximum possible frequency of y after performing the above operation optimally on the array.
The first line of the test case contains an integer N and Y. The number of elements in the array and integer Y . ($$$1 \le N \le 10^5$$$) and ($$$-10^5 \le Y \le 10^5$$$).
The next line contains N integers of the array.
For each test case print the maximum possible frequency.
4 2 1 3 4 5
1
2 -10 1 1
2
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.