Infix to Postfix using stack

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ธ.ค. 2013
  • See complete series on data structures here:
    • Data structures
    In this lesson, we will see an efficient algorithm to convert Infix to Postfix using stack data structure.
    See source code here:
    gist.github.com/mycodeschool/...
    For practice problems and more, visit: www.mycodeschool.com
    Like us on Facebook: / mycodeschool
    Follow us on twitter: / mycodeschool

ความคิดเห็น • 342

  • @ThePalkiaTrainer
    @ThePalkiaTrainer 5 ปีที่แล้ว +380

    6 years after this video has been published , still it saves engineering students

    • @CorporateGamer
      @CorporateGamer 4 ปีที่แล้ว +18

      @walkman 12/June/2020 computer science student saved!

    • @johnvick8861
      @johnvick8861 4 ปีที่แล้ว +7

      True m alive

    • @aadershchaubey1399
      @aadershchaubey1399 3 ปีที่แล้ว

      @walkman who was killing you in lockdown

    • @aadershchaubey1399
      @aadershchaubey1399 3 ปีที่แล้ว +2

      @@CorporateGamer who was killing you in lockdown

    • @aakashgoswami2356
      @aakashgoswami2356 3 ปีที่แล้ว +1

      31 Dec 2020 , another engineering student saved |

  • @dipanshusomeshwar
    @dipanshusomeshwar 6 ปีที่แล้ว +357

    For those who disliked, you can not get better then this.

    • @rajenkumar6212
      @rajenkumar6212 6 ปีที่แล้ว +5

      Dipanshu Someshwar
      Are you getting the solution... subtitle is distributing it is at wrong location

    • @AshwiniSingh27
      @AshwiniSingh27 6 ปีที่แล้ว +14

      than*
      .............

    • @mbogniruvic9796
      @mbogniruvic9796 5 ปีที่แล้ว +1

      I agree with you

    • @abhisheksolutions3368
      @abhisheksolutions3368 5 ปีที่แล้ว +15

      true, but people dont value free things, they will like half this quality if they have to pay a hefty fee for it, and regarding location of subtitles, one can just switch them off if they distract...

    • @saireddybonthu985
      @saireddybonthu985 4 ปีที่แล้ว +1

      At 9:21
      In the while loop why the !s.empty is used, the stack is initially empty and the condition fails in first iteration

  • @petarkovachovski
    @petarkovachovski 3 ปีที่แล้ว +64

    Just to note, combining this lesson with the previous lesson you can make a working calculator.

    • @malikm3941
      @malikm3941 ปีที่แล้ว

      what previous video

  • @AbhishekRavalfuntwixt
    @AbhishekRavalfuntwixt 9 ปีที่แล้ว +79

    i just wonder , if you wouldn't have made this videos , then i would have been literally ended up just cramming the stack , que ,etc from any local author! but the flow of your explanation is indeed dulcet ! thanx a lot for employing your time to help students like us !

  • @kajal091s
    @kajal091s 5 ปีที่แล้ว +26

    You just saved me from jumping off a building.
    Thanks mate.

    • @chill_dude_743
      @chill_dude_743 3 ปีที่แล้ว +3

      people jumping off cuz they didn't understood a topic,awesome

  • @cadeezra315
    @cadeezra315 5 ปีที่แล้ว +1

    The real beauty of the video starts around the 12 minute mark with the parentheses. I couldn't, for the life of me, find a way to work with parentheses, but when he did his excellent job explaining it I was finally able to work it out.

  • @gabrielferrin
    @gabrielferrin 6 ปีที่แล้ว +42

    Congratulations on your videos. I'm studying in an university and your videos are much easier to understand. Thumbs up!

  • @debadiptobiswas5611
    @debadiptobiswas5611 5 ปีที่แล้ว +112

    the USA hav Stanford
    India has mycodeschool

    • @rjk368
      @rjk368 4 ปีที่แล้ว +23

      But, thankfully, the whole world has mycodeschool!

  • @aviralagarwal5871
    @aviralagarwal5871 4 ปีที่แล้ว

    I am speechless by your understanding of data structures , so clean apt and to the point , a huge thank you really

  • @alceguy
    @alceguy 3 ปีที่แล้ว

    By far the best infix/prefix/postfix series on TH-cam

  • @abhigyanraha5620
    @abhigyanraha5620 5 ปีที่แล้ว +1

    Clear, crisp, precise and concise. You and your content are amazing! Thanks!

  • @vkhanhvy8330
    @vkhanhvy8330 8 ปีที่แล้ว +10

    Thank you! This lesson was very clear and easy to understand.

  • @danielokeefe8130
    @danielokeefe8130 9 ปีที่แล้ว +13

    Thanks. This was a terrific explanation of the conversion.

  • @SizzlerWA
    @SizzlerWA 4 ปีที่แล้ว +1

    Well done! This is the clearest explanation of this topic that I have ever seen. Thanks so much for sharing.

  • @yeniaraserol
    @yeniaraserol 5 ปีที่แล้ว +1

    @mycodeschool, please make more videos! I haven't seen a better explanation to this conversion. By far the best!

    • @saireddybonthu985
      @saireddybonthu985 4 ปีที่แล้ว

      At 9:21
      In the while loop why the !s.empty is used, the stack is initially empty and the condition fails in first iteration

    • @siddharthmagadum16
      @siddharthmagadum16 4 ปีที่แล้ว

      @@saireddybonthu985 That case is handeled at the last else condition where we append all teh leftover operators to the string form the stack.

  • @mrinaldhawan3959
    @mrinaldhawan3959 7 ปีที่แล้ว

    Great Explanation man. Everything explained in one video concisely!

  • @omarhafud
    @omarhafud 2 ปีที่แล้ว

    This lesson is going to live forever helping future students! Thanks.

  • @zahirjacobs716
    @zahirjacobs716 7 ปีที่แล้ว

    I needed to brush on this stuff recently, thank you so much for posting this clear example.

  • @Shivamyadav-xb7vg
    @Shivamyadav-xb7vg 4 ปีที่แล้ว +2

    Thank u Sir, my school teacher just made me to cram this, nut now i really understand the concept.
    MAY GOD BLESS YOU..

  • @user-ze8sm1kz7e
    @user-ze8sm1kz7e 8 หลายเดือนก่อน

    duude such a great clear explanation, still helpfull 9 years later, thanks a lot 👍

  • @zeke2161
    @zeke2161 6 ปีที่แล้ว

    Excellent video, couldn’t ask for a better explanation!

  • @jayjagtap7873
    @jayjagtap7873 4 ปีที่แล้ว +4

    RIP Sir, You are not with us but your legacy will live forever.

    • @antojosu
      @antojosu 4 ปีที่แล้ว

      @@zuhail339 what happened how??

    • @gigachad6844
      @gigachad6844 4 ปีที่แล้ว

      What??? Did he die????? how????

    • @MohamedHossam-in1yn
      @MohamedHossam-in1yn 3 ปีที่แล้ว

      @@antojosu That's his friend (the co-founder of this channel) not him

    • @antojosu
      @antojosu 3 ปีที่แล้ว

      @@MohamedHossam-in1yn Oh

  • @AdarshSingh-gx7si
    @AdarshSingh-gx7si 3 ปีที่แล้ว

    simple and outstanding ,cant have better videos on infix and postfix than this.

  • @user-rp6xi4il5z
    @user-rp6xi4il5z 6 ปีที่แล้ว

    omg,teacher,you are so much better than my professor,i become more confident after seeing your videos

  • @fahadhassan8749
    @fahadhassan8749 5 ปีที่แล้ว +1

    these are quite difficult but you made them easier for all of us !! Thanks for such kind effort but I'm still struggling with this algorithm since morning.Somehow my mind is muffed :(

  • @xUnic31x
    @xUnic31x 3 ปีที่แล้ว

    I understand what to do with my project now. Thank you for explaining it well!

  • @prasannakumarz
    @prasannakumarz 5 ปีที่แล้ว

    wow..! what an explanation it is! Really great.if this video doesn't exist i might have left stack topic for sure.

  • @shubhamk840
    @shubhamk840 4 ปีที่แล้ว

    intelligence of the guy teaching is very well visible through his lectures

  • @tamilbharathi563
    @tamilbharathi563 2 ปีที่แล้ว

    these videos are GOAT on data structures

  • @OliverJoshuaJacob
    @OliverJoshuaJacob 8 ปีที่แล้ว

    Your videos are worth Watching. Thanks for uploading them.

  • @lambdalearner7670
    @lambdalearner7670 4 ปีที่แล้ว +1

    even in 2019 your maths is still appreciated. THANK YOU !!

  • @prasannakumar6008
    @prasannakumar6008 9 ปีที่แล้ว

    Stupendous explanation and great illustration

  • @inter-
    @inter- 5 ปีที่แล้ว

    big thanks, this has helped me so much in short amount of time!

  • @oneeyedeagle549
    @oneeyedeagle549 4 ปีที่แล้ว +2

    I remember watching this video when I was in 11th and now I am watching this again in my second year . DAMN

  • @KanijahBrick
    @KanijahBrick 3 ปีที่แล้ว

    You are doing the Lord's work, even in 2021

  • @amanvijayvargiya3468
    @amanvijayvargiya3468 3 ปีที่แล้ว

    this video was uploaded on 2013 but still in 2020 this is the best explanation

  • @abocidejofa9686
    @abocidejofa9686 10 ปีที่แล้ว

    you are simply the best at explaining!!!! thank you

  • @SouvikHaldarmustang
    @SouvikHaldarmustang 5 ปีที่แล้ว +3

    mycodeschool has the best videos on DS and Algo in the entire youtube (or even Internet as whole)

  • @harshverma5873
    @harshverma5873 3 ปีที่แล้ว

    Such a quality content!!! ❤️... Undoubtedly it deserves more views and likes!

  • @guoweili9367
    @guoweili9367 5 ปีที่แล้ว

    Well explained, saved my due day! Thank you!

  • @shriyasingh1542
    @shriyasingh1542 6 ปีที่แล้ว

    perfect explanation...one more thing your voice is just awesome sir...

  • @Zoonice
    @Zoonice 4 ปีที่แล้ว

    Thank you for this awesome and straight forward video!

  • @yaronwera
    @yaronwera ปีที่แล้ว

    Best explanation ever STILL 🙏🙏🙏

  • @sawyermcbride1522
    @sawyermcbride1522 8 ปีที่แล้ว

    thanks my man!! This is super clear your a great teacher!

  • @Frook10yty
    @Frook10yty 10 ปีที่แล้ว +4

    This is really helpful! Great explanation.
    Thanks a lot.

  • @technowilliams480
    @technowilliams480 6 ปีที่แล้ว +1

    thank you bro your a real life saver

  • @muneebshahid5833
    @muneebshahid5833 9 ปีที่แล้ว

    very nicely and smoothly explained.Thanks

  • @noraamer3666
    @noraamer3666 7 ปีที่แล้ว

    Thanks a lo0Oo0Oo0Oo0Oo0Oo0Oo0Ot for your great videos :)
    Note: breaks are missed in switch case in GetOperatorWeight function which leads to ignoring arithmetic precedence - Because returned weight will be 3 in the all cases -

  • @mbogniruvic9796
    @mbogniruvic9796 5 ปีที่แล้ว

    Really nice work the best I've found I can now start with my project Thank you

  • @manasadeevi3275
    @manasadeevi3275 9 ปีที่แล้ว

    thank u sir for making my exam more simplest

  • @mr-shady
    @mr-shady 8 ปีที่แล้ว

    Super understandable! Thanks, this video really helped me with my project :).

  • @KanagaveluSugumar
    @KanagaveluSugumar 8 ปีที่แล้ว

    Wow!! Really awesome explanation :) Lots of thanks!

  • @pressurekeed1452
    @pressurekeed1452 2 ปีที่แล้ว +1

    24/03/22 and it still saved me

  • @iosonoi.7132
    @iosonoi.7132 5 ปีที่แล้ว

    This is the best video for infix to postfix

  • @jonidaalimadhi7371
    @jonidaalimadhi7371 9 ปีที่แล้ว

    Found it really helpful!! Thank you :)

  • @anpiobaire8943
    @anpiobaire8943 5 ปีที่แล้ว

    Most excellent teaching. Thank you.

  • @nju415
    @nju415 7 ปีที่แล้ว +1

    Really clearly explained

  • @madhav3444
    @madhav3444 3 ปีที่แล้ว

    How someone can dislike these gem videos

  • @saisrisai9649
    @saisrisai9649 6 ปีที่แล้ว

    Omg I now understand hurray! All credits to u sir 😊

  • @aeee_sasny
    @aeee_sasny 4 ปีที่แล้ว

    Thank you.
    I dont understand English but i understand algorithm.
    You are the best👍

  • @simplymade7802
    @simplymade7802 6 ปีที่แล้ว +4

    I like yr accent... really very helpfull...
    Thanku soo mch sir..for yr valuable time....

  • @HenryDarnell
    @HenryDarnell 9 ปีที่แล้ว

    Excellent lecture, thanks so much

  • @PranKrishnaDas
    @PranKrishnaDas 8 ปีที่แล้ว

    clean simple explanation...thank you. :)

  • @nouru6856
    @nouru6856 6 ปีที่แล้ว

    You're the best Dude!!! Keep up

  • @rohithmanda7348
    @rohithmanda7348 8 ปีที่แล้ว +1

    amazing video !! good explanation..

  • @Morning92StarX
    @Morning92StarX 9 ปีที่แล้ว

    Nice one, clearly stated everything

  • @seathroma2290
    @seathroma2290 9 ปีที่แล้ว

    Thanks for clearing my confusion

  • @cassj7
    @cassj7 3 ปีที่แล้ว

    Thank you! I really understand this now!

  • @kdineshreddy3254
    @kdineshreddy3254 6 ปีที่แล้ว

    @ 7:42 what it mean? there r 2 ways in which we can find the end of the right operand for an operator a)If we get an operatoer of lesser precedence

  • @NaomiMisora1000
    @NaomiMisora1000 8 ปีที่แล้ว

    Thank you so much! This is very useful.

  • @HeyThereGuy
    @HeyThereGuy 4 ปีที่แล้ว

    Subscribed. Great video.

  • @antoniodominikovic3150
    @antoniodominikovic3150 6 ปีที่แล้ว

    This was great, thank you.

  • @surajchavan1000
    @surajchavan1000 9 ปีที่แล้ว

    easy to understand nd hard to 4gt....awsmmm xplaintn :)

  • @dearvivekkumar
    @dearvivekkumar 10 ปีที่แล้ว +3

    great explanation as always .... Lots of thanks for your videos.

  • @basharatmir4025
    @basharatmir4025 2 ปีที่แล้ว

    thnx for uploading such video. very helpful

  • @sagardafle
    @sagardafle 7 ปีที่แล้ว

    Well Explained!
    Thank you sir :)

  • @samikshadutta2536
    @samikshadutta2536 4 ปีที่แล้ว

    pseudocode was very tough nd explained so quickly..however logical view was gud

  • @ahmedboukhousse1152
    @ahmedboukhousse1152 4 ปีที่แล้ว

    Excellent explanation ----> 5 STARS

  • @shamofengbao
    @shamofengbao 7 ปีที่แล้ว

    GREAT! now my code works! THANK YOU!

    • @shamofengbao
      @shamofengbao 7 ปีที่แล้ว

      different from how i did it, but your explanation has clarified and helped me successfully debug!

  • @yashgarg9580
    @yashgarg9580 2 ปีที่แล้ว

    Best video for explanation :)

  • @VersatileAnthem
    @VersatileAnthem 5 ปีที่แล้ว

    i just love you sir.

  • @sadhusundardas2079
    @sadhusundardas2079 8 ปีที่แล้ว +4

    Sir I dont understand . plz explain - if(op == "$") . in your code ...

  • @ungaybob
    @ungaybob 9 ปีที่แล้ว

    Great explanation.

  • @smanipasu
    @smanipasu 5 ปีที่แล้ว

    really i have understood how to convert infix to postfix.

  • @koraycengiz7656
    @koraycengiz7656 ปีที่แล้ว

    YOU ARE THE BEST. THANK YOU :)

  • @ahmadziasayeedy8186
    @ahmadziasayeedy8186 7 ปีที่แล้ว

    Thanks a lot for your great and helpfull vedios

  • @vallimayilnsit5013
    @vallimayilnsit5013 5 ปีที่แล้ว

    very easy to understand,thank you

  • @abhinavbatra8557
    @abhinavbatra8557 8 ปีที่แล้ว

    very good explanation.

  • @eyadbereh
    @eyadbereh 6 ปีที่แล้ว +5

    thanks sir...i wish you were my professor

  • @AmarnathGouda
    @AmarnathGouda 3 ปีที่แล้ว

    2014 Passed out, still remembered

  • @aakstatic
    @aakstatic 4 ปีที่แล้ว

    no one can teach better than this!!!

  • @allenllewellynkra
    @allenllewellynkra 6 ปีที่แล้ว

    Great tutorial. thank you sir

  • @kevinmackey3166
    @kevinmackey3166 9 ปีที่แล้ว

    What changes need to be made to this approach for working with multi-character operands?

  • @elizabethswan9726
    @elizabethswan9726 9 ปีที่แล้ว +1

    wow awesome ^_^ thank you so much

  • @kaligula4life
    @kaligula4life 7 ปีที่แล้ว

    How do you know in the function hashigherprecedence which is the s.top() if the stack hasn't been populated????

  • @RajeshSingh-zv7dm
    @RajeshSingh-zv7dm 6 ปีที่แล้ว

    thank you .Lots of love

  • @alanalmeida7887
    @alanalmeida7887 3 ปีที่แล้ว +2

    R.I.P! Your videos will survive

  • @nightfuryacoustic2954
    @nightfuryacoustic2954 4 ปีที่แล้ว

    Thank you so much from Vietnam

  • @LoveevergreenHits
    @LoveevergreenHits 5 ปีที่แล้ว

    Can you make a video by dividing a column into
    scanned | stack | expression

  • @GAMINGLORDS398
    @GAMINGLORDS398 9 ปีที่แล้ว

    its very clear. its easy to understand. Thanks