Ad
  • Default User Avatar

    thrice in my benchmark. it operates inplace

  • Default User Avatar

    I hit this issue as well. After a couple dozen attempts I managed to pass all the tests anyway.

    Afterwards I tried out the reference solution against my own, and the reference certainly has some bug in it. For example, reference::elder_age(3,3,1,100) returns 5 instead of the correct 6 (easily verified by hand).

  • Custom User Avatar

    As far as rust is concerned, mut a is not a change of signature.

  • Default User Avatar

    Is this solution really twice faster than approach with iterators?

  • Default User Avatar

    I'm not sure how the term "signature" is strictly defined, but for all practical purposes I wouldn't consider mut a part of a signature. The vector is borrowed the same way and mut refers to a local variable, so the difference can't be observed outside.

  • Custom User Avatar

    Is it ok to change function signature?