pls explain how the output is coming 22 in this question’s testcase
Pls explain how the output is coming 22 in this question's testcase
You are given a circular array which means that the first and last element are connected. So in the testcase:
7
8 -8 9 -9 10 -11 12
12 and 8 will be considered consecutive numbers. So we will take {12, 8, -8, 9, 10} which all add up to 22.
Hey @ANIKET_DALAL, I hope i have cleared your doubt, if so kindly mark the doubt as resolved. Thanks.
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.