3.9 Evaluation of Prefix and Postfix expressions using Stack | Data Structures

  Рет қаралды 448,537

Jenny's Lectures CS IT

Jenny's Lectures CS IT

Күн бұрын

Пікірлер: 179
@anthamh
@anthamh 3 жыл бұрын
Thanks so much!! I was about to flunk my ACSL contest but then I watched this video. Thanks a lot again god bless you, madam.
@official-ali
@official-ali 5 жыл бұрын
you are just making our life easier. Thank you.
@SaifulIslam-en3ji
@SaifulIslam-en3ji 4 жыл бұрын
Hi,i love your teaching style where you have shared so technically, thanks for effective lecture on prefix and postfix.
@HEENARANA-ij6my
@HEENARANA-ij6my 11 ай бұрын
In previous video u said first we have to reverse the equation n solve from right to left but here you have directly started with right to left without reverse
@harshyadav208
@harshyadav208 18 күн бұрын
did you found the answer ?
@shivamchhabra7135
@shivamchhabra7135 5 жыл бұрын
Beauty with brain ❤️❤️😍 Edit 1: my comment got highlighted 😍❤️
@keerthanarajendran988
@keerthanarajendran988 3 жыл бұрын
Thank you so much mam you are making DSA a easier subject
@hashensenevirathna1245
@hashensenevirathna1245 4 жыл бұрын
Madam you are very talented and you can teach very clearly ,this lecture series is great help to me ,thank you lot👍
@vaishnavidongare4408
@vaishnavidongare4408 4 жыл бұрын
Nice explanation !! Can u plzz give code implementation also.
@shaileshadole8080
@shaileshadole8080 2 ай бұрын
no
@supriyavarma8107
@supriyavarma8107 3 жыл бұрын
Ma’am please make a lecture on creating a program for infix to prefix and Infix to postfix expression
@GADDETEJESH
@GADDETEJESH 4 ай бұрын
mam why didn't u give codes for all this expression evaluations😔😔😔
@sabitkondakc9147
@sabitkondakc9147 4 жыл бұрын
Thanks for the Lecture, in addition to it, "-+2*34/[16]^23" in coding it's a must to put a type brakets to define a two or more digit number, otherwise it'll fail; here an example with C# : public double EvaluatePrefixExpression(string evaluateString) { StringBuilder appendBuilder= new StringBuilder(); int length = evaluateString.Length; for (int i = length - 1; i >= 0; i--) { string c = evaluateString[i].ToString(); if (char.IsDigit(c,0)) { double term = Convert.ToSByte(c); Push(term); } else if (c=="]") { char join = evaluateString[--i]; while (join!='[') { appendBuilder.Insert(0, join); join = evaluateString[--i]; } Push(Convert.ToDouble(appendBuilder.ToString())); appendBuilder.Clear(); } else { switch (c) { case "^": double first = Pop(); double second = Pop(); double result = Math.Pow(first, second); Push(result); break; case "*": first = Pop(); second = Pop(); result = first * second; Push(result); break; case "/": first = Pop(); second = Pop(); result = first / second; Push(result); break; case "+": first = Pop(); second = Pop(); result = first + second; Push(result); break; case "-": first = Pop(); second = Pop(); result = first - second; Push(result); break; } } } return Pop(); }
@luissalvador1348
@luissalvador1348 4 жыл бұрын
Wow this is so easy to understand. Thank you.
@aayushisharma4051
@aayushisharma4051 3 жыл бұрын
madam your teaching is very good .
@AnishKumar-qq8yh
@AnishKumar-qq8yh 2 ай бұрын
Dhanyawad from andromeda galaxy
@animefacts4007
@animefacts4007 2 жыл бұрын
Dhanyabad from Nepal 💓💓💓
@vakhariyajay2224
@vakhariyajay2224 2 жыл бұрын
Thank you very much. You are a genius. 👍👍🔝🔝👌👌🙏🙏
@soumikpaul2413
@soumikpaul2413 5 жыл бұрын
always feel good to learn from you
@AkashGupta-bu3kr
@AkashGupta-bu3kr Жыл бұрын
You are a great teacher mam
@sushma2615
@sushma2615 2 жыл бұрын
Your work is really appreciatable... Thank you so much mam....
@TahirKhan-fd8vr
@TahirKhan-fd8vr 2 жыл бұрын
Literally mam you are fabulous 😃
@atabhabibi8091
@atabhabibi8091 3 жыл бұрын
Thank you so much for your help May God guide you
@vindy11712
@vindy11712 Жыл бұрын
Nice explanation madam 🥺❤
@vikranthbandi5833
@vikranthbandi5833 4 жыл бұрын
your explanation is very good mam
@shivrajsinhgohil9474
@shivrajsinhgohil9474 4 жыл бұрын
Very clear explanation Ma'am.
@nimraali4085
@nimraali4085 4 жыл бұрын
Your teaching method isExcellent 😍
@aniketkumar2502
@aniketkumar2502 2 жыл бұрын
Thanks you mam for making useful video for us
@rumiNITPatna
@rumiNITPatna 23 күн бұрын
amazing video mam!
@kyliemun2681
@kyliemun2681 5 жыл бұрын
your explanation is really clear maam!!!!! please keep on making new videos. if possible, please do for queues in data str too:)
@vamshikrishnam9206
@vamshikrishnam9206 4 жыл бұрын
u made DSA easier
@mehakgoyal9223
@mehakgoyal9223 4 жыл бұрын
Your lecture does wonder for my revision... Thanks jenny👍
@V.Rchannel
@V.Rchannel 10 күн бұрын
Mam -*+abc/d^ef ans is 18 solve proper plz😊
@TheDIVINEcasteR
@TheDIVINEcasteR 3 жыл бұрын
the priority of ^ is 4. Right?
@vikranthbandi5833
@vikranthbandi5833 4 жыл бұрын
what is the algorithm to infix to postfix and also infix to prefix and vice versa ??
@Ek_e_Alfaaz
@Ek_e_Alfaaz 4 жыл бұрын
Thanku so much for ur lectures 🙏😊
@kishork80
@kishork80 4 жыл бұрын
simply great :) loved it
@justcurious1940
@justcurious1940 10 ай бұрын
Nice explanation.
@irfanbasha7445
@irfanbasha7445 4 жыл бұрын
Mam,Thnk u. But we also need code for dis.😜
@ArijitsClasses
@ArijitsClasses 2 жыл бұрын
Mam one question, Why are we using carat for calculating powers??? Isnt it used for calculating XOR operations??
@verilog_programming
@verilog_programming Жыл бұрын
ma'am, we can use anyone method to transform the expression , correct or not
@code_with_me0801
@code_with_me0801 2 жыл бұрын
Thank you ma'am
@meghasinha1706
@meghasinha1706 3 жыл бұрын
Thanks for your efforts mam
@namangokharu2069
@namangokharu2069 4 жыл бұрын
Here is again a problem, 0:59 prefix is +a-*bc/d^ef
@niharikagoulikar2921
@niharikagoulikar2921 4 жыл бұрын
No,it's wrong plz check your answer
@pravallikachinnari1047
@pravallikachinnari1047 3 жыл бұрын
Naman Gokharu is correct
@ravibisht2904
@ravibisht2904 4 жыл бұрын
Woow Mam your lecture are awesome and no offence I could't take my eyes 👀 from u look pretty too.. Thanks🙏🙇
@sheikhobama3759
@sheikhobama3759 3 жыл бұрын
Ma'am, Thank you so much..all your videos have helped me a lot.. Although I have a small doubt. (5:15) For "/168" we did 16/8 and not 1/6, but for *342 why are we doing 3*4 and not 34*2. It would be great if anyone could explain it to me. Thank You.
@vikasbagri1225
@vikasbagri1225 3 жыл бұрын
because 16 here is acting as a whole ( given d = 16 ), while 3 4 2 are three individual values ( given a = 2, b = 3, c = 4 ). Hope you have got your answer.
@SachinKumar-up6jr
@SachinKumar-up6jr 2 жыл бұрын
😁😁😄
@vinaykagitha6704
@vinaykagitha6704 3 жыл бұрын
Simply awesome 👌
@prashantpandey9051
@prashantpandey9051 2 жыл бұрын
Bhot bhdiya madam ji😇😇
@shirishareddy2795
@shirishareddy2795 4 жыл бұрын
mam last video 3.8 u tell prefix scan from left to right but in these lecture u tell right to left.which one is right.
@maheshwarienmulwar2500
@maheshwarienmulwar2500 2 жыл бұрын
You are just awesome💯
@sd.firdose3275
@sd.firdose3275 4 жыл бұрын
U r just amazing...mam..
@JavaAidTutorials
@JavaAidTutorials 5 жыл бұрын
Good one..
@c.d.premkumar6867
@c.d.premkumar6867 Жыл бұрын
4.50 how do you distinguish between single digit operand and double digit operands ?
@gueshteklu8624
@gueshteklu8624 8 ай бұрын
Hello My Teacher ? Can I Ask U 1 Question??? Evaluation Of Prefix With Out Stack Is Easier Than That of Using Stack And With Out Stack I f The compiller Executes Multiple Times Why We Need Using Stack To Evaluate Such Expression? Thanks.
@medserghini1025
@medserghini1025 6 ай бұрын
without stack the compiler need to evaluate the expression multiple times so that is time consumming process instead using stack the process will be fast because the evaluation is only once time
@PriyanshuSharma-vf6su
@PriyanshuSharma-vf6su 4 жыл бұрын
amazing explanations
@pradipathawale8285
@pradipathawale8285 Жыл бұрын
Mam, 2^2^2^2 evaluate this using prefix please..There are getting two answers, 256 and 65,536, So, kindly solve my difficulty. First convert into prefix
@nikhilpachkor8349
@nikhilpachkor8349 4 жыл бұрын
Nice Explanation
@laplacesdemon8140
@laplacesdemon8140 4 жыл бұрын
excellent work
@weareindians8731
@weareindians8731 3 жыл бұрын
Thank you mam. And mam you are looking beautiful
@nishanty7392
@nishanty7392 5 жыл бұрын
Love u Mam 😘❤
@ayesha24237
@ayesha24237 6 ай бұрын
Power has lower precedence than divide so why its come before / and -
@arshpreet805
@arshpreet805 2 жыл бұрын
Mam a+b*c-d/e^f and am getting prefix ^-+a*bc/def if am doing wrong please correct me......
@shekapuramrutvik295
@shekapuramrutvik295 3 жыл бұрын
Mam the evaluation is working only for single digit(i.e. evaluation using stacks). Is there anyway for doing on multidigit operands using stacks?
@bigk2367
@bigk2367 3 жыл бұрын
IT CAN WORK FOR BOTH BROTHER.
@BTECH-j1v
@BTECH-j1v Жыл бұрын
mam's now hits hard
@abdulwahabkhan5260
@abdulwahabkhan5260 3 жыл бұрын
Thanks a lot miss.
@sparkindness
@sparkindness 4 жыл бұрын
Mam how to give a=2, b=3,c=4, d=16 e=2 f=3please tell me all time the value is same And also tell me ABC+* DE/- what is the value of A and B,C,D E only and how to take that plz mam my exams are soon so i expecte to reply me
@mdmahfuzarrahman2322
@mdmahfuzarrahman2322 2 жыл бұрын
Wonderful explanation ♥ ♥ ♥ ♥
@prajyotdeshpande6602
@prajyotdeshpande6602 Жыл бұрын
What is precedence of "%" symbol?
@shekshub4760
@shekshub4760 5 ай бұрын
Modulus
@samsaikia5949
@samsaikia5949 3 жыл бұрын
Do we have to follow operator precedence ?
@gd7474
@gd7474 5 жыл бұрын
Awesome😇
@ranjeetrathaur9378
@ranjeetrathaur9378 3 жыл бұрын
Thanks ma'am! ❤️
@coder4861
@coder4861 Жыл бұрын
please tell the answer of this question mam evaluate the expression below expression using prefix form 2 3 9 * + 2 3 ^ - 6 2 / +
@coder4861
@coder4861 Жыл бұрын
please give solution of this question mam this question is of aktu 2020-21
@divyamadival9781
@divyamadival9781 4 жыл бұрын
Thank u soo much
@SounakKaran
@SounakKaran Жыл бұрын
mam plz give the coding implementation also then it will fruitful
@aatmakumar4631
@aatmakumar4631 2 жыл бұрын
Nice class
@RiteshKumar-ud7bf
@RiteshKumar-ud7bf 3 жыл бұрын
Ma'am what if there is just one operand after an operator.
@amishss2352
@amishss2352 4 жыл бұрын
Output of the following prefix exp *+2-21/-42+-531 Plzz mam solve this ques...
@sheetal_s5153
@sheetal_s5153 4 жыл бұрын
I think This is invalid expression
@amishss2352
@amishss2352 4 жыл бұрын
Thank you for reply me back..
@amishss2352
@amishss2352 4 жыл бұрын
Actually solve hogya tha Baad main.. Output is 2
@sheetal_s5153
@sheetal_s5153 4 жыл бұрын
@@amishss2352 how it is solved
@amishss2352
@amishss2352 4 жыл бұрын
Convert this prefix expression to infix expn ...then evaluate this
@HosRo4161
@HosRo4161 2 жыл бұрын
Thank you!
@diptimitra607
@diptimitra607 3 жыл бұрын
Tusi great ho ❤️
@antarikshasharma3102
@antarikshasharma3102 5 жыл бұрын
Thank you so much mam
@sanjanam.r1643
@sanjanam.r1643 Ай бұрын
Can anyone please share the code for prefix evaluation!?
@subashpudasaini3433
@subashpudasaini3433 5 жыл бұрын
Thank you mam😍
@nidhigupta9801
@nidhigupta9801 4 жыл бұрын
what if we get -ve value in between as 4(-2)6/+9+13/-
@anamitramaiti1175
@anamitramaiti1175 4 жыл бұрын
Thank you so much 😊😊😊
@reshma4961
@reshma4961 3 жыл бұрын
Thank you💕✨
@mashapoguajay3322
@mashapoguajay3322 2 жыл бұрын
mam why to check right to left in prefix
@025.madhuraaher9
@025.madhuraaher9 2 жыл бұрын
Mam could share the program to evaluate prefix operation
@subhajitde4917
@subhajitde4917 5 жыл бұрын
Plz mam dont look this much pretty i got distracted 😍
@ShubhamKumar-su2wr
@ShubhamKumar-su2wr 3 жыл бұрын
Mam , how to code the priority table?
@aryanmaniyar3475
@aryanmaniyar3475 Жыл бұрын
Thanks Mam :)
@nikhilpattanaik-3118
@nikhilpattanaik-3118 4 жыл бұрын
Mam if the prefix expression is -5 6 7 the what will be its result. Plz give the ans mam
@motivationalspot1448
@motivationalspot1448 4 жыл бұрын
1 7 is the answer.
@thedevhacker4608
@thedevhacker4608 3 жыл бұрын
Maam I have this Expression A + B * C ^ (X - Y * Z / ( B + 2) ) < Y * B - (C + D) &&B != ( C + A) ^ 3 How can I solve this it has comparision operator and &&
@bigk2367
@bigk2367 3 жыл бұрын
CONDITION OPERATOR ALWASY GIVE ANSWER IN TRUE OR FALSE(1 AND 0) SO AS I THINK AFTER SOLVING BOTH SIDE YOU WILL GET TRUE OR FALSE AS YOU ARE USING && BOTH CONDITION NEED TO BE TRUE.
@mdnoorzafirmondal7398
@mdnoorzafirmondal7398 2 жыл бұрын
Can you evaluate this postfix operation : 2 3 + 11 * /
@vishalkumar...5971
@vishalkumar...5971 2 жыл бұрын
239*+23^-62/+ postfix using stack mam this question is not solve me so mam plz solve the question...plzzzzzz
@HEENARANA-ij6my
@HEENARANA-ij6my 11 ай бұрын
Mam i guess u didn't reverse the equation ??? For prefix
@gauravpoosarla
@gauravpoosarla 4 жыл бұрын
is multidigit postfix or prefix possible?
@akashkaundal7104
@akashkaundal7104 5 жыл бұрын
Hats off 2 u mam
@manishshah2424
@manishshah2424 4 жыл бұрын
You are GOD
@Prologgaming
@Prologgaming 4 жыл бұрын
Right
@dhruvpatel5947
@dhruvpatel5947 3 жыл бұрын
Hii,mam, Evaluate the following postfix expression using a stack.show the stack contents. AB*CD$-EF/G/+ A=5,B=2,C=3,D=2,E=8,F=2,G=2 Please solve this question And make a video please mam
@vikranthbandi5833
@vikranthbandi5833 4 жыл бұрын
mam can i know what is the code for the following question ?? and also what type of stack operation to be performed is it array method or linked list method which is efficient ??
@lol-bo7ro
@lol-bo7ro 3 жыл бұрын
Thanks
@simransingh6137
@simransingh6137 3 жыл бұрын
Thank you mam
3.10 Postfix Expression Evaluation using Stack | Data Structures and Algorithms
11:02
3.8 Infix to Prefix using Stack | Data Structures Tutorials
24:05
Jenny's Lectures CS IT
Рет қаралды 967 М.
Каха и лужа  #непосредственнокаха
00:15
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 32 МЛН
Noodles Eating Challenge, So Magical! So Much Fun#Funnyfamily #Partygames #Funny
00:33
Evaluation of Prefix and Postfix expressions using stack
14:10
mycodeschool
Рет қаралды 636 М.
3.6 Infix to Postfix using Stack | Data Structures Tutorials
20:10
Jenny's Lectures CS IT
Рет қаралды 1,8 МЛН
How I Mastered Data Structures and Algorithms in 8 Weeks
15:46
Aman Manazir
Рет қаралды 95 М.
Lecture 1: Introduction to CS and Programming Using Python
1:03:30
MIT OpenCourseWare
Рет қаралды 856 М.
L3. Prefix, Infix, and Postfix Conversion | Stack and Queue Playlist
50:47
AIR 6 vs AIR 600 after 6 years of graduating IIT
1:12:56
Harkirat Singh
Рет қаралды 25 М.
Reverse Polish Notation and The Stack - Computerphile
13:32
Computerphile
Рет қаралды 308 М.
3.12 Expression Trees | Binary Expression Tree | Data Structures Tutorials
13:17
Jenny's Lectures CS IT
Рет қаралды 667 М.