Searching a triangular array for a sub-triangle having minimum-sum
This is a simple problem. My old code is kind of brute force, but we are lucky since that we do not need to search too many points to find the minimum. This time, I make my code have a little bit "memory". This "a little bit memory" dramatically speeds up me code. It only takes 0.4 second to find the answer.
No comments:
Post a Comment