Why some of my testcases failing ?
Doubt in my code
hello @yashsharma4304
use >= in place of > while calculating inc and dec array.
rest everything is correct.
also dont declare array of fixed size its not a good practice.
always declare it like this->
int n;
cin>>n;
int a[n];
pls check ur updated code here ->
1 Like