Here is my code for Broken Calculator question.
All test cases are passed except Test Case 0 , it give “run-error”.
Can you suggest the possible reason for this error and also have a look on my code.
Broken Calculator
@nikhilmeena you have taken max size of your array 500 but for many cases number of digits can be greater than 500 and your array will not be able to store them and hence will give you run time error,take your max size 2000 it will work fine.