Ad
  • Custom User Avatar
    • There should be example cases in the description

    • you should return the smallest size of that group should be diameter as it contradicts with the size key

    • Random tests only have three sizes whereas sample tests have at least ten

  • Custom User Avatar

    There're different ways to calculate the ratio for comparing price-per-squared-inch values (e.g. this) but they don't work here since regardless of the approach there will be inaccuracies from floating point computations which will mess up the order of the elements, and no rounding will be able to fix this. Either the description should provide an exact formula to be used or all the inputs should be integers to enforce using the solution linked earlier.

  • Default User Avatar

    The description is not clear at all, there's probably a trick to it but the 6kyu label doesn't warrant the time needed to complete.

  • Custom User Avatar

    Duplicate of all katas with problem statement as finding max with a key, (and the key is simple mathematical formula).

  • Custom User Avatar
    [
      {
        size: 'small',
        diameter: 7.973257075859718,
        price: 10.534023236496173,
        coupon: 1
      },
      {
        size: 'medium',
        diameter: 9.691686830733442,
        price: 15.463893092050782,
        coupon: 0
      },
      {
        size: 'large',
        diameter: 11.830106347736677,
        price: 20.921556537018805,
        coupon: 0
      }
    ]
    

    price property doesn't seem to be limited to two decimal places.

  • Custom User Avatar

    Role of coupons is not explained.

  • Custom User Avatar

    It seems to me that if you "love" pizza you would return the largest pizza for a like price...
    Instructions are: "If more than one size has the same price per square inch, then you should return the smallest size of that group."
    Wouldn't you want the "largest size" of that group???

  • Custom User Avatar

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