Ad
  • Custom User Avatar

    You're still using <pre><code>. That can be replaced with triple backticks like so:

    ```
    // Example code
    ```
    
  • Custom User Avatar

    Can you explain why you use a list, not an array? The suggestion was to keep array, only change the generic parameter type from string to BigInteger. A list is a mutable object. This kata does not require any mutation of the collection. So why did you go from array to list?

  • Custom User Avatar

    that last statement is now outdated

  • Custom User Avatar

    from description:

    The array can contain up to 10^5 elements.

    yet, the input is a List, not array.

    Note: I've no idea why you use a list over an array ...

  • Custom User Avatar

    Why did you solve the issue? I will create a new one.

  • Custom User Avatar

    Thank you. Can you check it ?

  • Custom User Avatar

    yeah I guess you're right, only the description should be changed to BigInteger instead of string.

  • Custom User Avatar

    I am not sure here. If I read the task correctly, the result is a sum of digits, and it should be difficult to have a sum of digits to exceed int?

  • Custom User Avatar

    then change return type to BigInteger as well, or not?

  • Custom User Avatar

    Change from string to biginteger was per my suggestion below, which I made because I did not understand what's the point of having inputs as long strings of numbers. The strings also caused a lot of ugly code in tests.

  • Custom User Avatar

    I also don't understand why you changed from string to BigInteger. What's the purpose? And why is the return type an int, not BigInteger as well?

  • Custom User Avatar

    Description does not fit new argument type.

    You must create a function ConsecutiveSum(string[] arr)

    Given an unordered array of strings representing non-negative integers

  • Custom User Avatar

    @AtoG can you check it ?

  • Custom User Avatar

    Failure message in Sample Tests

    tests/Fixture.cs(18,62): error CS1503: Argument 1: cannot convert from 'string[]' to 'System.Collections.Generic.List<System.Numerics.BigInteger>'
    tests/Fixture.cs(26,62): error CS1503: Argument 1: cannot convert from 'string[]' to 'System.Collections.Generic.List<System.Numerics.BigInteger>'
    tests/Fixture.cs(34,62): error CS1503: Argument 1: cannot convert from 'string[]' to 'System.Collections.Generic.List<System.Numerics.BigInteger>'
    tests/Fixture.cs(46,62): error CS1503: Argument 1: cannot convert from 'string[]' to 'System.Collections.Generic.List<System.Numerics.BigInteger>'
    tests/Fixture.cs(59,62): error CS1503: Argument 1: cannot convert from 'string[]' to 'System.Collections.Generic.List<System.Numerics.BigInteger>'