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.
Of course it's not.
Exponential function is e^x
I'd be very surprised if Python was the only tool to have a frame inspector in its librairies.
You're welcome to write the translations :)
Why not?
Seemed obvious at first. Not so. Pretty good.
Is this really a 5?
Never mind. It was a bug in my code. It all works now. Very challenging kata. Excellent
I have a fast solution that works on all tests except the randomized test. Can you confirm all tests are valid? Thanks
I figured it out. It passes now. The funny thing is that the correct solution was one of the first I thought of, but because it ran out of time, I assumed it was wrong. Then with some simplification it all worked out. Good kata.
The intended two-pass solution is O(N). (You can take this as a hint at how it works.)
The description did say
"... the centre of the biggest solid region of that colour"
implying that there might be other, smaller, regions of the same colour.
Having said that though, there are some tests in which two or more regions have maximum-depth pixels. To try to cover this, I've changed "region" to region(s)" in the description.
I am a bit stuck on this one. I have an algorithm whose complexity I estimate to be O(N*log2N) where N is the number of pixels.
Everything works except the big test which I can't get to run below 7 sec. or so. Obviously I am missing something because I can't
seem to be able to see the 2-pass solution.
According to the description the object of interest is a large block of contiguous pixels all of the same colour. I took it to mean 'exactly one block'. In reality, the random tests contain cases where the given color is distributed over several contiguous areas. Either way is fine, but I thing the description should reflect that and some of the non-random tests should exercise that situation.
The elevator problem was one of my first school projects in CS. Seems easy at first but it's non-trivial. Good kata.
After a few attempts I managed to come up with a simple solution. It's like a piston. Up and down, up and down.
But where do you stop, that's the question.
Too easy for 5 kyu. I think, it should be 6 or 7 kyu.
Loading more items...