Ad
  • Custom User Avatar

    The whole design of this kata is flawed. Mixing different data type for expected output is a bad practice, let alone needing to explicitly handle the case when only 1 combination is found!

    As of 21/1/2025, there are a total of 323 submissions, so revamp of tests to expect only an array of arrays / a list of lists can still be done with minimal tradeoff with all solutions being invalidated ! (This also adds the compatibility of the kata to be translated across strongly typed languages)

    • If the function receives an empty array will output an specific alert:

      Why not just return [] for this case? Since an empty array literally represents nothing to process in the first place !!!

    • If there are no combinations with sum equals to 0, the function will output an alerting message.

      Why not just return [[]] for this case ? Since an array consistng of only an empty array represents after processing the array, no combination was found

    • Description does not mention we need to just return the first combination, not the entire array. Though the first example implies this, it is no where stated clearly in written words...

    • OTOH, the explicit handling of 1 combination mentioned above increases the number of data types for the expected output -> an array. So, such requirement should not be there in the first place !

  • Custom User Avatar

    The random tests in Python have several issues:

    • Lower bound of rows/columns of 2 instead of 10 per the description.
    • Reference solution throws an error if no elements of the contour are within the range $[a,b]$, which is not a guaranteed property of the generated matrices.
  • Custom User Avatar

    in cpp version code works fine locally on my visual studio and gives the right output while when i do test or attempt it gives wrong output on the site

    Example Error:
    Expected: equal to (1, 999, 999)
    Actual: (1, 118, 999)

    While it gives (1, 999, 999) on my visual studio
    all error like this on the site when i tried it on my visual studio it gives the EXPECTED CORRECTLY!

  • Custom User Avatar

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

  • Custom User Avatar

    (Haskell, maybe others)

    Fixed test cases allow for solutions that do not properly check for square matrices such as this solution.

    I've made a Haskell fork that adds the following test cases:

    matrix = [[1,1,-3,4],
              [1,1,-2,3],
              [1,1,-4,2]]
    vector = [1,1,1,1]
    
    matrix = [[1,1,-3],
              [1,1,-2],
              [1,1,-4,5]]
    vector = [0,0,0]
    
  • Custom User Avatar

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

  • Custom User Avatar

    What is going on?

    Time: 2708ms Passed: 0Failed: 4Exit Code: 1
    Test Results:
    Fixed_Tests
    Basic_Tests
    Expected: equal to [8.6667, 6.6667]
    Actual: [8.6667, 6.6667]
    Random_Tests
    Moderate_Values
    Expected: equal to [33, 37.3333]
    Actual: [33, 37.3333]
    High_Values
    Expected: equal to [642.333, 895.667]
    Actual: [642.333, 895.667]
    Huge_Values
    Expected: equal to [4697.33, 6422]
    Actual: [4697.33, 6422]

  • Custom User Avatar

    What is a partition? Define partition..
    Examples assumed that partition is something the user should be aware of?

  • Custom User Avatar

    https://en.wikipedia.org/wiki/Pascal%27s_triangle
    The sum of the elements of row 2 ** n.

    The solution is 2 ** n -1.
    From a mathematical point of view, why -1?

  • Custom User Avatar

    I think the sentence in the description should read:

    Prepare a code that given the number of digits n, may output the amount of palindromes of length equals to n and the total amount of palindromes below or equal to 10n.

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    Description markdown is broken when Java is selected.

  • Custom User Avatar

    In the description, under "Examples", the brackets in proc_arrInt(arr1) ------> [21, 2, [9, [36]] are mismatched (3 opening, 2 closing).

  • Custom User Avatar

    the tests depend on OrderedDict being imported by the user at the top level

    from solution import *
    

    should be:

    from collections import OrderedDict
    from solution import Array
    
  • Loading more items...