7 kyu

Sum of a nested list

1,510 of 3,197kingcobra
Description
Loading description...
Recursion
Lists
Algorithms
Fundamentals
View
AllIssues4QuestionsSuggestions3Show Resolved
  • Please sign in or sign up to leave a comment.
  • tobeannouncd Avatar

    Haskell translation

    Hopefully this translation stays within the spirit of the original kata, as the elements must be homogenous in a standard Haskell list.

  • saudiGuy Avatar

    python: Mutating the input list breaks random tests.

  • saudiGuy Avatar

    python new test framework is required. updated in this fork

  • saudiGuy Avatar

    Python :

    • Tests should not print to stdout.
    • The example tests aren't using the test framework, and both test suite and example tests are missing the imports (user's solution + framework).
  • user9644768 Avatar

    Ruby 3.0 should be enabled, see this to learn how to do it

  • aman82591 Avatar

    My Code is Working well on every test but i am getting a STDERR in the end test. Can you explain me why is this happening.

  • bluiisdave Avatar

    this is not clear: Testing with: [[86, 69, 99, [11], 76], 27, 27, 5, 14] [[86, 69, 99, [11], 76], 27, 27, 5, 14] 414 should equal 0 why should it equal 0? i pass all the tests besides random tests,its really not clear this is litterly the description: Implement a function to calculate the sum of the numerical values in a nested list. For example :

    sum_nested([1, [2, [3, [4]]]]) -> 10

  • GiacomoSorbi Avatar

    Crystal translation available :)

  • theru Avatar

    Could be a bug! Please check your test assertion in "11 should equal 10", because my IDE works correct !

  • phil_r Avatar

    This Kata sucks because it is not solvalble due to wrong test implementation!

    Random tests Log Testing with: [77, 46, 65, 2, 23] 213 should equal 0

    WTF? I calculated the correct number but you expect 0 ?

  • Blind4Basics Avatar

    Note that the argument should be lst or something like that, not L

    Approved (shorter and shorter...)