LeetCode Interview Problem - Reverse Polish Notation

Поделиться
HTML-код
  • Опубликовано: 2 авг 2024
  • #keeponcoding #tech #programming
    ** SUBSCRIBE TO THE CHANNEL **
    / @keeponcoding
    -----------------------------------
    ** SUPPORT ME ON PATREON **
    / keeponcoding
    -----------------------------------
    ** INSTAGRAM **
    / keep_on_coding

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

  • @tannerbarcelos6880
    @tannerbarcelos6880 4 года назад +2

    Great explanation. I’m about 10 problems away from solving 40 leetcodes which is my target to begin only doing mediums till I graduate.. this problem is super cool and this code is gonna help a lot. I keep forgetting that you can just use pop and that it returns the value and removes it. So, I’m glad your code made that easily readable and understandable. I love me some python for leetcode but damn Java’s collection library is really something else.. it’s making me want to make the switch

  • @maxbarahona9675
    @maxbarahona9675 4 года назад +4

    Time Complexity: O(n)
    Space Complexity: O(n)
    n: being the length of the array "tokens"

    • @KeepOnCoding
      @KeepOnCoding  4 года назад +1

      Thanks for sharing! I realized after I recorded that I forgot time and space complexity.

  • @gothfrog69
    @gothfrog69 2 года назад

    Thank you. Simple and clear!

  • @dannynip
    @dannynip 4 года назад

    Nice solution. I have a bad habit of not considering other data structures, so it's good to see other perspectives.

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

    that was great, I've got a question what happens when you are dividing is it possible to get a decimal number since your val2 is integer

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

    Wow this was great. However, how should you do to be able to have multiple digit expressions?

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

    Nice channel)

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

    Thanks

  • @MK-xl5yo
    @MK-xl5yo 4 года назад

    hey sir how you get dark mode of leetcode?

    • @KeepOnCoding
      @KeepOnCoding  4 года назад +1

      userstyles.org/styles/166630/leetcode-dark-only-for-problems

    • @MK-xl5yo
      @MK-xl5yo 4 года назад

      @@KeepOnCoding Awesome thanks, really was annoyed by that white background! Nice! Also I've found if you launch Playground and select some theme theme lets say Monokai, then in any leetcode problem window, code style will be same.

  • @ryadov1
    @ryadov1 2 года назад +1

    I lost it at 4:13