One testcase is giving right answer but while submission all the test cases are showing wrong answers.
here’s my code. Please correct it.:
Test cases are not passing while submission
hello @Mudit809
a) use long long variable to avoid overflow
b) intialise s with maximum value in the array .since array is not sorted it need not to be b[m-1] always.
refer this -> https://ide.codingblocks.com/s/232056
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.