[Java] Leetcode 718. Maximum Length of Repeated Subarray [DP Subsequence #9]

Поділитися
Вставка
  • Опубліковано 5 лис 2024

КОМЕНТАРІ • 6

  • @AlexN2022
    @AlexN2022 Місяць тому

    in a sequence 3 - 2 - 1, we have calculated the longest subarray starting at "2". But we cannot simply reuse that for 3->2, since the location of the 2' match in the other array may be disconnected from the location of the 3's match.

  • @Kaafirpeado54-6ayesha
    @Kaafirpeado54-6ayesha 11 днів тому

    How to come up with these ideas on my own 😮

  • @mdlwlmdd2dwd30
    @mdlwlmdd2dwd30 2 роки тому +5

    This is the definition of memorizing solution without knowing whats actually happening.