Ad
  • Default User Avatar

    @shotah

    All input strings will be nonempty, and will only consist of parentheses, brackets and curly braces: ()[]{}.

  • Custom User Avatar

    This is not cheating. Those people just solve the kata, with a code that passes the tests. This is what CodeWars is all about. The one(s) to blame are the author(s) of the kata and/or the translations who provided incomplete tests. And to clarify: I did not check whether what you say is correct or not about invalid codes.

  • Custom User Avatar

    Many people are completing this with invalid code. Why are we only testing brackets? This should be testing complete statements. aka "(some code)" vs. "()". I'm seeing a lot of cheat by not expecting other values other than braces.

  • Default User Avatar

    See this

    they require Node 12, it's not a kata issue (codewars support up to Node 12 but javascript tests cannot be edited for this kata :/ )

  • Custom User Avatar

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

  • Custom User Avatar

    Sorry to bring this up, but the question is still confusing. When I look at the example: [[5,2],[1,10],[3,3],[1]] If we are discuss min/max why isn't [1] West chosen? My guess is it has something to do with but it is higher than the choices they could make from the other sets but is not outliend above. aka eg the LOWEST score in that inner array. Anyrate, not going to give this a go because I have no idea how you are trying to calculate that direction.

  • Custom User Avatar

    Your code's problem. Nobody said year is limited to 4 digits.

  • Custom User Avatar

    PowerShell test is broken:

    Get-CenturyFromYear
    should return 18 when input is 1705
    should return 19 when input is 1900
    should return 17 when input is 1601
    should return 20 when input is 2000
    should pass random tests
    Expected: {9947}
    But was: {99}
    Stack Trace
    Completed in 111ms