Application of Stacks (Infix to Postfix) - Part 8

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ม.ค. 2025

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

  • @nisharathod2945
    @nisharathod2945 2 ปีที่แล้ว +24

    Neso is SOOO underrated, I am able to solve toughest questions by learning crystal clear basics from them! You guys are amazing!

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

    The genius behind all genius, keep the work going sir!

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

    Sir please Continue the course rapidly , because sir we are facing problem on sorting and tree
    Thank you sir one of the best channel ever ❤️🙏

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

    Mind blowing explanation sir. Thank you sir😇🙏

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

    I have loved this video, thank you so much for making it.

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

    You are a great teacher sir 🙏🙏🙏,,,,One humble request Sir please complete this playlist fast ,

  • @485-anuhyajanjam7
    @485-anuhyajanjam7 3 ปีที่แล้ว +1

    Sir please make the video on python programming sir .I understood the C programming because of your channel.I want to learn python programming sir.

  • @MDSagor-tu1xw
    @MDSagor-tu1xw ปีที่แล้ว +3

    Does it work for multi digits infix expressions ? What will happen if I use a multi digit infix expression ?

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

    Thank you for the lecture 👍🏻

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

    Thanks ! Noted down every detail. 👍

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

    Thank you so much Sir.

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

    siiiiiirrrrr I can't thank you enoughhhhh

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

    Do make videos on prefix also

  • @mohamedsamir2726
    @mohamedsamir2726 11 หลายเดือนก่อน +2

    For entering more than one digit number i made some modifications as:
    void InToPost()
    {
    int i, j=0,x;
    char symbol, next;
    for(i=0; i

    • @MohammedSamir-w9k
      @MohammedSamir-w9k 11 หลายเดือนก่อน +1

      I am the same person and here is the overall code with some modifications:
      #include
      #include
      #include
      #include
      #define max 100
      int top = -1;
      int stack[max];
      char infix[max];
      short postfix[max];
      void push(int data);
      int pop();
      void InToPost();
      int precedence(short s);
      int post_evaluation();
      void print(short *s);
      int main()
      {
      int result;
      printf("Enter an infix expression: ");
      gets(infix);
      InToPost();
      print(postfix);
      result = post_evaluation();
      printf("Evaluation of postfix = %d
      ",result);
      return 0;
      }
      void InToPost()
      {
      int i, j=0,x;
      short symbol, next;
      for(i=0; infix[i]!=NULL; i++)
      {
      symbol = infix[i];
      switch(symbol)
      {
      case ' ':
      case '\t':
      break;
      case '(':
      push(symbol);
      break;
      case ')':
      while( (next = pop()) != '(')
      postfix[j++] = next;
      break;
      case '^':
      case '*':
      case '/':
      case '+':
      case '-':
      while(top!=-1 && precedence(symbol) = '0' && infix[i+1]

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

    Sir please upload all dsa lecturex before 10 january as I have final semester exams from 15 january.

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

    Cool sir. i hope can converted to arduino code.

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

    Sir also add queue topic

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

    Please Sir upload lectures early

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

    Problem: :(
    The algorithm will not work If the operand is of multiple digits.
    Example:
    Infix exp : (31+2)*2/3
    Postfix exp: 312+2*3/
    Array: |3| |1| |2| |+| |2| |*| |3| |/|
    Now when we evaluate the above expression we will push 3 1 2
    And the moment we encounter an operator (+) we will pop 2 and 1. And will perform 1+2 which yeilds 3 then we will push this into the stack now the stack contains
    3 3
    Push 2
    3 3 2
    Encounter *
    Do 3*2 = 6
    Push 6
    3 6
    Push 3
    3 6 3
    Encounter /
    Do 6/3 = 2
    Push 2
    3 2
    Scanning finishes
    Now pop 2
    So as per the algorithm the result of the above expression is 2 and that's obviously wrong.
    The result must be 22

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

      Yes sir!!

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

      Yes obviously it will not work with multiple digits, that's why it is called as infix (a operator between 2 operands : A+B.

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

      Sir has already mentioned in the video that is the drawback we can only perform on single digit operands

    • @dkdivakar699
      @dkdivakar699 11 หลายเดือนก่อน

      it is single digit evaluation bro😊

    • @dkdivakar699
      @dkdivakar699 11 หลายเดือนก่อน

      so you can take single digit

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

    Sir tell the computer organisation course sir,please

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

      th-cam.com/play/PLBlnK6fEyqRgLLlzdgiTUKULKJPYc0A4q.html

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

    1st view 🤭