Ad
  • Custom User Avatar

    Thank you very much for pointing it to me! It's very helpful

  • Custom User Avatar

    Use a copy (read the Ruby docs about how to make one) so your function doesn't mutate it and the expected result is right.
    The control function use the input values your function left, so after you removed the chars it returns false instead of true.

  • Custom User Avatar

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

  • Custom User Avatar

    Strings are mutable in Ruby, if your code fails the random tests I'm almost sure, you're mutating the input values.

  • Custom User Avatar

    Hi, Im working on Ruby, but fails on random examples. It seems these are not right, but maybe I'm wrong:

    the test passing:

    Testing for pehbtflhefipqh and ep
    Test Passed: Value == true

    Test I'm failing:
    Testing for poqmqvkoubgyva and qompkvq
    It should work with random inputs too - Expected: false, instead got: true

    According to my understanding, I can definitely create qompkvq using characters in poqmqvkoubgyva. Could you please confirm the test is correct and the failed example should actually return false?

    Many thanks!