• Custom User Avatar

    Of course it's not.

  • Custom User Avatar

    Exponential function is e^x

  • Custom User Avatar

    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 :)

  • Custom User Avatar

    Why not?

  • Custom User Avatar

    Seemed obvious at first. Not so. Pretty good.

  • Custom User Avatar

    Is this really a 5?

  • Custom User Avatar

    Never mind. It was a bug in my code. It all works now. Very challenging kata. Excellent

  • Custom User Avatar

    I have a fast solution that works on all tests except the randomized test. Can you confirm all tests are valid? Thanks

  • Custom User Avatar

    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.

  • Custom User Avatar

    The intended two-pass solution is O(N). (You can take this as a hint at how it works.)

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Too easy for 5 kyu. I think, it should be 6 or 7 kyu.

  • Loading more items...