LeetCode 1994. The Number of Good Subsets

Поделиться
HTML-код
  • Опубликовано: 8 окт 2024

Комментарии • 4

  • @toekneema
    @toekneema 3 года назад +1

    thank you, however i dont think the @lru_cache does anything. there are no repeat states for this take/don't take knapsack

    • @happycoding1093
      @happycoding1093  3 года назад

      I think you are right, thanks for pointing that out

  • @LingfeiLu
    @LingfeiLu 3 года назад

    The explanation for pirmeMask is unclear. Also prime mask for 5 is 100 and for 7 is 1000. I think you reverse them.

    • @happycoding1093
      @happycoding1093  3 года назад

      yes, I skip that part, the position of 1 is reversed