Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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')
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.)
Cool! You shouldn't need the case where length is 1 though - try to make it so you only have 1 base case :)
python test suite updated. Resolved.
issue confirmed: that is because 98% of the random tests are returning False.
pretty pythonic recursion!
This comment is hidden because it contains spoiler information about the solution
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)
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.
This comment is hidden because it contains spoiler information about the solution
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
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 ofaString
right of last occurence ofNote: My answer concerns JS version of kata.
Does it help ?
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)