Это видео недоступно.
Сожалеем об этом.

Comp Sci in 5: Shunting Yard Algorithm

Поделиться
HTML-код
  • Опубликовано: 17 окт 2017
  • There is no code here, just go over the logic of the algorithm and an example. If you can remember the logic, then you can create it whenever you need it!

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

  • @pawlstothewall
    @pawlstothewall 3 года назад +42

    Isn't your infix expression invalid? There is a random multiplication hanging out between the '3' and the ')'. If I'm incorrect, please explain for me. Thanks.

  • @ematsuno
    @ematsuno 5 лет назад +35

    An incredible amount of explanation in the shortest amount of time. Bravo!

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

    your demeanor and clear way of speaking makes this so much less stressful. Thank you

    • @compsciin5932
      @compsciin5932  3 года назад +2

      Absolutely my pleasure! Thank you for taking the time to write this comment

  • @felixluebkenn
    @felixluebkenn 2 года назад +2

    you are a god to us mortal compsci students. god bless your soul.

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

      Thanks for leaving this comment bro!

  • @spencerfink9329
    @spencerfink9329 6 лет назад +8

    very informative. Loved the visualization of the queue and operators. Keep posting. Luv your videos

  • @amihartz
    @amihartz 3 года назад +2

    The visual representation here is very helpful! Thank you!

  • @markslab2960
    @markslab2960 3 года назад +2

    thanks a lot man . I passed the exam with this video.

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

      You are most welcome! I am happy that this was helpful for you bro

  • @antoninedelchev6076
    @antoninedelchev6076 5 лет назад +11

    I don't know if you still read the comments on your videos, but I want to thank you for taking the time to explain this algorithm in a clear, simple and quick way.

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

      You are most welcome Antoni

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

      Comments like yours really touch my heart thank you for taking the time to write them

  • @brianwsmithers
    @brianwsmithers Год назад

    Excellent visual explanation. I inherited a class project that utilizes this algorithm so I'll be referring to this video often! Much appreciation.

    • @compsciin5932
      @compsciin5932  Год назад +1

      Thanks man! Appreciate you taking the time to send me this message. Good luck in your project !

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

    Amazing video you created! Thanks so much

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

    Concise video, great stuff! Cheers

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

    Sir please continue your videos they are awesome... I just saw today

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

      Wow thank you for writing this comment!

  • @fred-ho2yf
    @fred-ho2yf 2 года назад

    thank you for your clear explanations

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

    Sir You made this algorithm very easy to visualize, Great explanation

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

      Thank you buddy, appreciate your kind words

  • @Emir-yo8ek
    @Emir-yo8ek 26 дней назад

    glad for ur effort sir

  • @xSteelCatx
    @xSteelCatx 6 лет назад +24

    What kind of expression is: (5*4+3*)-1 ?
    It should cause a syntax error

    • @compsciin5932
      @compsciin5932  6 лет назад +19

      Hey Daniel,
      You are right it would cause a syntax error :/. To be 100% honest, There is supposed to be a 2 right after the * and before the ).
      I cut one of those out, and had it in, however, on the second or third take it went MIA lol
      Hopefully the core concepts are still there !

    • @farrukhsaif108
      @farrukhsaif108 3 года назад +2

      @@compsciin5932 I started questioning my own existence and even tried to execute that in python to make sure I wasn't tripping xd

    • @compsciin5932
      @compsciin5932  3 года назад +2

      @@farrukhsaif108 Lol that is hilarious

  • @mjthebest7294
    @mjthebest7294 2 года назад +5

    Omg! It was sooo good. How about functions, unary operators and composite functions? I would love to see some practical examples:D

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

    Best explanation ever

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

    Best explanation ever, better then my teachers explanation :D

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

      Wow thanks man! Appreciate the kind words d:^)

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

    Great explanation. Thank you kind sir.

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

    good stuff. i liked your energy

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

      Thank you, It’s tough to get excited about the shunting yard but I tried lol

  • @Ajaykrishna97_
    @Ajaykrishna97_ 8 месяцев назад

    What is the precedence of logical operators "||" and "&&"

  • @tyrannicrex7114
    @tyrannicrex7114 5 лет назад +1

    very intuitive , thank you

  • @videodude5337
    @videodude5337 Год назад

    Thank you!

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

    Amazing!

  • @bikramghosh3167
    @bikramghosh3167 Год назад

    yes 2023 we are here

  •  5 лет назад +3

    This would fail for exponentiation, because of the associativity. You have to check for left vs. right associativity of operators before pushing onto the stack.

    • @kurtishaut910
      @kurtishaut910 5 лет назад +2

      There are plenty of examples out there that people can grab the code from, these videos are just trying to hit at the main concepts

  • @user-sq6uu3xx6u
    @user-sq6uu3xx6u 9 месяцев назад

    Buen video

  • @BulalarTeam
    @BulalarTeam Год назад

    Why (5*4+3*)-1?

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

    What if we push sin ,cos

  • @TheSharkasmCrew
    @TheSharkasmCrew 11 месяцев назад

    Awesome visualization, but how do you evaluate the RPN if there's two operators in a row? e.g. in your example you have 5,4,*,3,*,+,1,-
    So we multiply 4 and 5 together, then take the result and multiply it with 3, then take that result and add it to what exactly?

    • @TheSharkasmCrew
      @TheSharkasmCrew 11 месяцев назад +1

      oh nvm I just replayed the vid and it's because your original example was malformed LOL `(5*4+3*)-1` isn't a proper expression

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

    thank you so much this was very helpful - but just a quick question - what is the purpose of this? Like why does it do this? And if we relate it to the algorithm, such as I am thinking of the youtube algorithm, how does this relate?

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

      The shunting yard algorithm is generally used in calculators and mathematical computations.

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

    excellent video.

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

      Thank you

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

      @@compsciin5932 Dont stop making videos , please. They are very logical and you really are a good teacher. I hope this channel grows.

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

    AdventOfCode2020 participants, welcome!

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

    Thanks

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

    thanks sir

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

    Great explanation...

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

    lol what was with the intro? XD

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

    Great and all but it is rather annoying that it wasnt 100% clear that - - also should be pushed to the postfix like this:
    3-1-1
    Is 31-1-
    And not 311-- as i assumed.
    I only noticed after my code gabe me the wrong result.
    Same goes for /* , */, +- and -+. At least for me.

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

    Really helpful. Pity about the missing 2 but it doesn't affect how understandable it is.

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

      I am really happy to hear that it was helpful :-) There was a 2 in there in a previous take (as I am sure you inferred) but it went MIA haha

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

    that intro was earrape

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

      You are quite right about that, my apologies

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

    Dude, that shout at the beginning was freaking horrible! Whhhhhyyyy???!!! Other than that, it's a very informative video.

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

      Lmao I am one of those guys who laughs at their own jokes