Ad
  • Custom User Avatar

    -1 is the output for when there is no valid solution.

  • Custom User Avatar

    In Elixir, some test cases seem broken. All sample tests pass, but some later test in the full suite always fails, expecting a result of 0 when there is no correct result (-1).

    Example:

    1) test Fixed tests More tests (TestSuite)
         test/solution_test.exs:51
         Assertion with == failed
         code:  assert Kata.solve_runes(s) == sol
         left:  -1
         right: 0
         stacktrace:
           (elixir) lib/enum.ex:783: Enum."-each/2-lists^foreach/1-0-"/2
           (elixir) lib/enum.ex:783: Enum.each/2
           test/solution_test.exs:64: (test)
           
    Testing input: "47848+-?39008=-5911?0"
    

    In this case, not only does 0 not solve the equation, but it also goes against the rule that no number will start with a zero.

  • Custom User Avatar

    I don't like how the tests push the input size too high for many implementations. Some languages are more efficient with this and others will not pass even with decent algorithms.

  • Custom User Avatar

    Just like the description says, inconsistent tests between languages. It's a whole different problem from one language to the next. My language happens to be one of the PITA ones, so I'll pass on this one. Hope this question can get an update for consistency and a better description as well!