I was close to it. But didn't.
Morning went to the session and our college principal integrated the chief guest who is going to select the candidate. And finally we came to the Round 1 it was an aptitude question. So just cleared it. And next the essay writing passed that. And finally I strucked between the coding section.
It's a simple one but tricky and take time to understand the logic.
Three input P array size, Q difference between the array elements, A[]array.
The concept is we have to enter those three variable as input.
P = 6;
Q=1;
A[1,3,2,4,5,6]
And output should be
5
Guess the logic
In the input array value, the number of possibility of difference of Q between 2 arrays should need to be printed.
It solidly take 15 minutes of time. And I just typed some C coding time ended. I get failed 😢.