How to approach this question other than brute force?
Challenges : Binary Search, Alpha Score
hello @deep4013
this problem is just small variation of inversion count problem.
so i recommend u to first solve inversion count problem
I tried it using inversion count method. But still 2 out of 5 test cases are failing. Code link : https://ide.codingblocks.com/s/440088
check now->
value of mod was incorrect
Ok got it, silly mistake from my side. Close this doubt too.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.