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.
I did the same to find out a mistake in this kata.
It exactly works with all tests, but if we try, for example, this data: string == 'bcacqc' and ending == 'bc'.
It will return True, but False expected.
Create a global variable which can be referenced from within your function.
What do u mean by refrence it for your solution?
ah crap. that actually makes so much sense! thanks for the enlightenment!
Ah, I found that out now aswell
No, memoization is not required.
it's a pitty memoization is required to stay within time constraints
It's more the fact that if you're computing all of the primes with values between 2 and 1.5M for every test it will likely time out. What if you only compute the primes once, then reference it for your solution?
And on my computer looking through 1,15000000 takes about 2 seconds. Is that too much????
Is this a logarithm problem? I have a solution that once again will work for smaller numbers, but once you hit the bigguns it times out! Ughhhhh
I have had two working solutions for Python and both took too long. How much brute force is okay? Really hitting a wall here...
Fixed, thanks.
This may definitely help!
i would suggest you use the factored polynomial to determine factors of n and see if they determine positive integers for x and y. i hope that doesnt give away too much
I did see the hint there. Just wondering if it means anything so far but I saw when I graph the hyperbola for n = 12, x = 4 is intersected at y = +- 1. Since we are only interested in positive answers, the intersection at (4, 1) seems to be leading me onto something maybe? EDIT : Well it definitely works for all the test examples. Just how to quickly get all quadrant I integer only plot points???? HMMMMM
Loading more items...