Ad
  • Custom User Avatar

    on the 3 conditions given in the script what condition satisfied the url below that it still displayed just the domain name

    domain_name('http://yahoo-test.com/asdfa/asdf/asdf/asdf/index.html')

  • Default User Avatar

    When you set up your dicts, you iterate through (and re-compute count() for) every character in every string. The strings could be very long. Iterating through each possible letter in the lowercase alphabet would have a fixed number of iterations regardless of the length of the input strings.

    (I saw other solutions using set() to potentially limit the iteration to the subset of the alphabet actually appearing in the input strings.)

  • Custom User Avatar

    Cool! You shouldn't need the case where length is 1 though - try to make it so you only have 1 base case :)

  • Custom User Avatar

    python test suite updated. Resolved.

  • Default User Avatar

    issue confirmed: that is because 98% of the random tests are returning False.

  • Custom User Avatar

    pretty pythonic recursion!

  • Default User Avatar

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

  • Custom User Avatar

    I am seeing several random tests fail for unknown reasons. The following two tests expected that the word would be found, but I can't tell why that would be the case:

    ['T', 'T', 'M', 'D', 'A']
    ['G', 'Y', 'I', 'N', 'N']
    ['P', 'A', 'L', 'C', 'E']
    ['I', 'A', 'U', 'L', 'G']
    ['A', 'M', 'I', 'N', 'A']

    AMINLGIA

    [['T', 'T', 'M', 'D', 'A'],
    ['G', 'Y', 'I', 'N', 'N'],
    ['P', 'A', 'L', 'C', 'E'],
    ['I', 'A', 'U', 'L', 'G'],
    ['A', 'M', 'I', 'N', 'A']]
    word is Z

    (very confusing - no Z on the board)

  • Default User Avatar

    My wrong solution successfully get through all 60+ test cases.
    Initially, there were 2 errors in ANIMALITY AND ANIMA (reason - incorrect way of blocking used cells).
    I have not yet solved this problem, just tried with reverse order and it accepted (tested many times).

    If somebody can review my code and tell me why my trail of used cells not resetted to savepoint with recursion collapse, and acts like it global.

    Well, anyway, more complex tests are needed.

    UPD: Added "True" true solution.

  • Default User Avatar

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

  • Default User Avatar

    with outside words_dict had 25 passed and [TypeError: 'function' object is not subscriptable] on random tests
    after moving this dict inside function - 125 passed and no error

  • Default User Avatar

    I don't understand what you mean by "using split string".
    Anyway last test ( 22th one ) tests same thing as 13th one ie right$( aString, ' ') => part of aString right of last occurence of .

    Note: My answer concerns JS version of kata.

    Does it help ?

  • Default User Avatar

    Can't submit this kata when using split string.
    'RUN TESTS' expanded to all variations of tests is working fine (21 Passed; 0 Failed; 0 Errors; Process took 101ms to complete)