Stock Maximize Discussions | Algorithms | HackerRank
  • + 0 comments

    I was wondering the same. It seems to me that the way the problems are categorized is not quite right. Some pretty hard problems are categorized as easy (see Dortmund Dilemma) and some that are not DP are listed as DP. And yes, there is at least one solution that is a simple linear sweep through the table of prices that computes the maximum profit. I think the only thing that's DP-like about it is that you have to work your way bottom-up to get the value. I wish all problems had high-quality editorials..