Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I feel stupid, I don't understand the assignment. Could someone who has done this explain what it's asking us to do? I scrolled through many comments and found instructions about edge cases and complaints about vagueness but couldn't find an improved description for the whole assignment. Thank you!

  • Default User Avatar

    The description of this Kata remains unclear.

    The description asks for a function with three stipulations:

    1: the function "returns the sum of a sequence".
    2: the sequence "is defined by 3 non-negative values".
    3: the function "should returns 0" ... "If begin value is greater than the end".

    According to this, in the case of rule 3, the sequence is still valid, and summing it 'should return 0'.

    The description could be clearer by asking for a function that "returns the sum of a sequence if begin value is less than end, otherwise returning 0."

    Not sure if this contributed to any confusion among the commenters, but I spent time trying to modify my function so that it would still return the sum of the sequence for all tests. Certainly beyond the difficulty of a 7kyu, but should anyone else interpret it literally, hopefully this will save you time.

  • Custom User Avatar
  • Custom User Avatar

    [JavaScript] It would be great if the sample tests could throw in one or two negative numbers. I definitely tripped up in the random tests by assuming that all integers would be non-negative (-:

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Why i get tese errors?

    ./src/main/java/Kata.java:3: error: cannot find symbol
    List index = new ArrayList<>();
    ^
    symbol: class List
    location: class Kata
    ./src/main/java/Kata.java:3: error: cannot find symbol
    List index = new ArrayList<>();
    ^
    symbol: class ArrayList
    location: class Kata
    ./src/main/java/Kata.java:10: error: cannot find symbol
    List nums = new ArrayList<>();
    ^
    symbol: class List
    location: class Kata
    ./src/main/java/Kata.java:10: error: cannot find symbol
    List nums = new ArrayList<>();
    ^
    symbol: class ArrayList
    location: class Kata
    ./src/main/java/Kata.java:15: error: cannot find symbol
    Collections.sort(nums);
    ^
    symbol: variable Collections
    location: class Kata
    5 errors

  • Custom User Avatar

    No random tests in Haskell

  • Default User Avatar

    @fyvfyv
    Could you repare random tests for this kata? We have there ugly for:

    for(int i = 0; i < array.size(); i++)

    Which leads us to warning:
    main.cpp:127:30: warning: comparison of integers of different signs: 'int' and 'std::vector::size_type' (aka 'unsigned long') [-Wsign-compare]

  • Custom User Avatar

    You aren't able to use any string/array/object methods, libs etc

    My solution uses an array method, so that's obviously not true. Moreover, this restriction is more annoying than anything.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution