Ad
  • Default User Avatar

    Me too, actually, I had to look up lambda syntax =]

  • Default User Avatar

    Good catch! Will refactor to account for this edge case, thanks!

  • Default User Avatar

    There are minor typos in 2 of the formula images in the description. In the formula for Uy, the part (xa - xb) should be (xb - xa). In the formula for distance between points A and B, the part (yb - yc)**2 should be (yb - ya)**2.

    Otherwise, nice kata!

  • Default User Avatar

    Perfect! Nice kata, btw, I enjoyed the sparse instructions and having to rely on tests and feedback to build the needed objects.

  • Default User Avatar

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

  • Default User Avatar

    The expected return value for area of a circle is incorrect. The formula for area of a circle is r * r * pi, but the tests expect r * pi instead. For example, the area of a circle with radius 2 (rounded to 2 decimal places) should be 12.57, but the test expects 6.28.

  • 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

    Perfect!

  • Default User Avatar

    Random Tests fail if array of max subsets is in a different order:

    Random Tests
    length of the arrays = 20
    array = [-2, -3, -4, 1, 8, -6, -7, 5, -6, 1, 7, -8, 10, 5, -3, -8, 3, -8, 8, -2]
    [[[1, 7, -8, 10, 5], [10, 5]], 15] should equal [[[10, 5], [1, 7, -8, 10, 5]], 15]
    

    Can the description be updated to specify in which order the max subsets are expected?

  • Default User Avatar

    Good point, the call to loadData is not tested.

  • Default User Avatar

    Does this require registering an Instagram account in order to obtain a valid access_token or client_id? Without it, I receive the following error:

    { meta: 
    { error_type: 'OAuthAccessTokenException',
    code: 400,
    error_message: 'The access_token provided is invalid.' } }
    
    { meta: 
    { error_type: 'OAuthParameterException',
    code: 400,
    error_message: 'The client_id provided is invalid and does not match a valid application.' } }
    
  • Default User Avatar

    That's exactly what the problem was. After changing my code, all tests passed. Sorry for the inconvenience!

  • Default User Avatar

    That's a possibility, although the non-random tests pass without issue. I'll recheck my code.

  • Default User Avatar

    Random tests for Ruby appear to expect an empty array:

    It should work for random inputs too - Expected: [], instead got: ["e", "w", "o", 0, {"c"=>8}, 8, 3, 7, {"w"=>4}, {"w"=>4}, 0, {"o"=>3}, 7, 7]
    
  • Loading more items...