Ad
  • Custom User Avatar

    liters is spelled wrong. Its liters not litres.

  • Custom User Avatar

    There is no reason for the Rust version of this kata to have an i32 return value. First, i32 isn't big enough for all possible f64 inputs. Second, the answer should never be negative, so you should encode that in the type system by using an unsigned int.

  • Custom User Avatar

    This Kata is not very robust. Big values for time would lead to invalid results as Double exceeds Integer by far. Double max comes at 2^52 while Integer can hold up to 2^32 considering the result value is on a fringe case 2^51 we will have to deal with overflow. Long would be the more appropriate output value for Double. Alternative to Long would be Float as an input parameter. Further negative inputs are not considered.

    That beeing said that are edge cases that are highly unlikely.

  • Custom User Avatar

    Personally I find this description kinda confusing.
    'Nathan drinks 0.5 liter every 1 hour.'
    This way it makes no sense that for 11h he drank 5l instead of 5.5l.
    It's more like he drinks 1l every 2h.

    I know it's about semantics, but in my case it made this simple kata hard, cuz I rounded wrong thing to smalles number as it matched the description better in my eyes.

  • Custom User Avatar

    In the examples you specify 'litres' but in the solution you ask for 'liters'. You should have conformity here. Probably also should specify which columns you want returned.