2487. Remove Nodes From Linked List - Day 6/31 Leetcode May Challenge

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

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

  • @Algorithmist
    @Algorithmist  6 месяцев назад

    Were you able to remove these nodes?

  • @chrischika7026
    @chrischika7026 6 месяцев назад +2

    recursion is the easiest solution here. monotonic stack makes sense if you solved Next Greater element. And the O(1) space reverse, get nodes, then reverse again is hard to come up with without hints.

  • @christophervradis7285
    @christophervradis7285 6 месяцев назад

    hey man love from Greece once again - thank you !

    • @Algorithmist
      @Algorithmist  6 месяцев назад +1

      ah, one day I'll return to Greece!