Ad
  • Custom User Avatar

    Marked as resolved.

  • Custom User Avatar

    Thanks. I edited my previous comment and marked the issue as solved. Did that do it? I did not receive any feedback that it worked and the comment keeps marked as "Issue" in red.

  • Custom User Avatar

    Indeed, even the definitions of alpha and digit are missing. Can identifiers use é? It's an "alpha" character...

  • Custom User Avatar

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

  • Custom User Avatar

    In Python, the tests fail because of some syntax error... I get:

      File "", line 14
        Test.describe("isValid")
           ^
    SyntaxError: invalid syntax
    
  • Custom User Avatar

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

  • Custom User Avatar

    Oops, my bad, I meant to say "also O(1) but has higher constants" ... Are javascript's arrays really O(n) for lookup? I have almost 0 experience with that language, so I didn't know. So weird =/

    Anyway, did you have time to look at my proposed solution? Almost a week has passed and I still don't see how that took longer than the working solution.

  • Custom User Avatar

    Hm... Python's lists are implemented as arrays of pointers, which means lookup is O(1). And it's even faster than dictionary lookup (which is also O(1) but has higher constants, given the need to hash the key).

    Edit to change: "also O(n)" to "also O(1)"

  • Custom User Avatar

    I finally managed to solve the kata with a solution very similar to your own. record is indeed an array. Why do you say that it won't work? (It does in the working solution...).

  • Custom User Avatar

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