Ad
  • Custom User Avatar

    Greetings everyone! Can anyone help understand the error?

    symbol: variable Kata

    location: class SolutionTest

    src/test/java/SolutionTest.java:11: error: cannot find symbol

      assertEquals("a (b c (d e))", Kata.reverseParens("a ((d e) c b)"));
                                    ^
    

    In IntlijIdea, I get the right results.

  • Custom User Avatar

    Apparantly not, description needs to be language-agnostic (the removal of function name from the example)

  • Custom User Avatar

    TypeError: text.findLastIndex is not a function
    I know that this method was added in Node.js 18.0.0, but why isn't this version available for this kata

  • Custom User Avatar

    Simple regex replace and implementing a calculator are not novel kata ideas.

  • Default User Avatar

    you could add "()" to the edge cases for C, I had first written a solution that didnt handle this and stll passed

  • Custom User Avatar

    OK, so to keep this interesting, you'll need to disable eval ( and by extension require and new Function ). ( Don't go inventing this yourself; steal it from where it's done correctly. )

    Don't lay on the function returning a function too thick; it's just a curried function.

    The 1-indexing of the arguments doesn't add anything interesting; just count from 0 and save everyone the hassle. I happen to like the wrapping, even though that, too, doesn't add much.

    The big one: allow syntax errors ( and handling them ).

    All of that will still result in a kata where most things have been done before. You might add unary +, multiple unaries, unaries on arguments and right-associative powers, and I could still reuse most of another kata's solution, adding just the arguments stuff ( which isn't too bad actually ).

    Do all of the above correctly and keep the random testing, and six years ago you would have been the Second Coming of the Messiah. Do all that today, and you might still just be ranked a 4 because people have seen it before. I happen to think it would rank as a 1 and would make a great kata. As it stands, it's a good start but it needs work.

  • Custom User Avatar