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.
Thanks,learn a lot!
if one writes a key-value list, it should be the fatest solusion.
My English is bad. It should be "how many cases whose ranks are higher " (rank#4 is higher than #8)
temp_record = dic_record.copy()
will copy dictionary in each time. This disadvatage comes from the idea of functionpossible_case(dict_word)
it may be optimized.yes
Thanks! It is confusing but you explain it clearly!
One can change the "ship_type" function(a dictionary instead of [0,0,0,0]) and the bool "judge" to make it correct to any size of field and any rules of avalible cell of ship.
I do not do it because dict will take me more time in coding.
You monster!
No, it is actually more confusing than that!
The first time array.pop(0) is executed the array variable is still bound to the input argument.
But after that, the array variable is rebound to a new list, and therefore no longer mutates the input argument.
So, the input array is changed after the function, but only with its first row removed.
At first, I want to handle like this, but did not consider so clear. learn from you! thanks!\
thanks again!
This comment is hidden because it contains spoiler information about the solution
incredible view! thank you!
Actually, I need not to get union of "intervals", what need to do is just do the arithmetic in the loop...
I think that I made this problem complete, two many .lower and isalpha increases the time complexity(but in a constant way).
hope someone give me some advices
This comment is hidden because it contains spoiler information about the solution
Loading more items...