We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Didn't enjoy solving this problem a lot: I was hoping that an optimized version of Dijkstra (advancing column per column, thereby keeping the sorted set small) would work but all my attempts resulted in some time-outs. So it seems that DP O(n^2) is the only way to go.
Speaking only for .NET languages that is.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #82: Path sum: three ways
You are viewing a single comment's thread. Return to all comments →
Didn't enjoy solving this problem a lot: I was hoping that an optimized version of Dijkstra (advancing column per column, thereby keeping the sorted set small) would work but all my attempts resulted in some time-outs. So it seems that DP O(n^2) is the only way to go. Speaking only for .NET languages that is.