Editorial Code:https://paste.ofcode.org/gMMsxap74BcDKF9BAuVPu2
My Code:https://paste.ofcode.org/73VC2QGdHxGVbZWJKzXBd5
two same test cases are not getting passed in both of them.
Editorial Code:https://paste.ofcode.org/gMMsxap74BcDKF9BAuVPu2
My Code:https://paste.ofcode.org/73VC2QGdHxGVbZWJKzXBd5
two same test cases are not getting passed in both of them.
Hey @abhinaygupta98
yours failing on testcases like this
3
1 1 0
Here corrected the editorial code u shared : https://ide.codingblocks.com/s/350525
Logc is to convert all 0’s to -1 and then find the max length subarray with 0 sum
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.