Ad
  • Default User Avatar

    I thank the author. It has been a learning experience, sort of psychedelic actually. I still need to review the "Best practise" code. Tomorrow

  • Default User Avatar

    So I went through the hints. I figured out the abstract math. I have the p', q' to make two steps at once. Now I can't seem to figure out how to apply it back to the case at hand. I guess I need to recursively apply this extended two-step transformation and thus arrive at exponential efficiency. But man it's hard to go back from the abstract math to code.

  • Default User Avatar

    Indeed. Right now I am stuck at that very place. My algo works, just times out at the big one. I guess I'm at linear efficiency and need to get to log...

  • Default User Avatar

    I made it! Thank you for the answer. I had already googled some dynamic programming before I asked. But I gues I had to go through all the fails.
    In the end it truly is simpler than it looked.

  • Default User Avatar

    First I wrote the greedy algorithm solution. Middle pyramid 1064.
    Then I went the brute force way and wrote a resursive function to test lesser pyramids and return all possibilities. Middle pyramid 1074. Large pyramid time-out :-/
    I like the kata, but I'm seriously stuck. This takes some advanced algorythmic jazz. Could I have a hint?