Arithmetic Formatter -Code

I have two Repl

  1. First-Test this is basically my code which is working as per test cases

  2. [Second] : But my code is failing in the tests when placed in format

Repl.it can make tricky to figure out what error is saying. Here’s copied out difference from the error. Lines starting with - are returned by function, lines with + are what is expected.

-     3      3801      45      123    
?                                 ----
+     3      3801      45      123
- + 855    -    2    + 43    +  49    
?                                 ----
+ + 855    -    2    + 43    +  49
- -----    ------    ----    -----    
?                                 ----
+ -----    ------    ----    -----
1 Like

And what does the ? refers to…I feel values returned by function is matching the expected outcome.

Okay, probably it is the extra spaces in the end

Yes checked and corrected, Thanks

? indicates where is the difference.