One one case passed
@alamsarfraz422 as the no of subarrays can exceed INT_MAX so use long long every where and then count the no of subarrays as
(j - i ) * (j - i + 1) / 2;
Coding Blocks IDE
this is the implemented code see it and if issue still exists let me know and if clear mark it as solved and rate my experience
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.