Getting correct answers for some. Wrong answers for some. Please help.
Circular subarray
Here’s the updated code: https://ide.codingblocks.com/s/313520
Please do revert back if you don’t understand.
Thank You. I understood my mistake.
- Previously the sum was not getting updated back to 0. It carried the stored value forward.
- Didn’t restore the original array before finding the total sum.