adaptatron's blog

By adaptatron, 3 hours ago, In English

Consider the famous Leetcode problem, House Robber, where you're a burglar trying to rob $$$n$$$ houses while ensuring that no adjacent houses are robbed. What is the maximum amount that you can rob?

Now, you're given several queries, and each query, you need to answer this problem if only the houses in the segment $$$[L \dots R]$$$ existed.

I created a video discussing the techniques used in this problem.

  • Vote: I like it
  • 0
  • Vote: I do not like it