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.
Eva is actually closer to the original Hebrew.
it turns out there are several ways
("Eva")
It returns 9223372036854774784
Your approach is correct, but implementation has a bug. What would be an expected answer for
est_subsets(list(range(63)))
? What does your solution return?not sure what I am supposed to do here tbh
I just can't figure out what the mathematical equation is to be able to do this problem...
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The question is hard to understand. Can someone give a test example with a smaller number please and/or a more dumbed down explanation? Thanks.
Your solution isn't exactly O(n). Because you are sometimes setting
j
to0
in your loop, your code can do quite a few extra iterations. Every time your code finds a match in s1, it starts from the beginning of s1 for the next letter, so you are iterating over at least part of s1 multiple times. For example, on the second sample test, your loop executes 45 steps, but it could be done in about half of that. Some of the inputs get pretty big (~200k characters). How many tests might you be doubling your workload on?I got the answer right but I am timing out so it is still failing. smh
Oh sorry just read it. I can revert to old version too :) Let me know what you think
It's not always the best, but with repetitive patterns (like this) it is very efficient.
I wouldn't. Either just set the limit lower, or leave it as is, sit back and enjoy.
Loading more items...