Stacks - Infix, Prefix & Postfix expressions | Lecture 56 | Java and DSA Course

preview_player
Показать описание
In this video, Raghav Sir will guide you to master the concepts of infix, postfix, and prefix expressions, along with their evaluation and conversion, using stacks. Our instructor will guide you through the evaluation of infix, postfix, and prefix expressions using stacks, and demonstrate how to convert prefix and infix expressions to postfix expressions using this powerful data structure.
Whether you're a beginner or an experienced programmer, this video is a valuable resource to help you understand and implement expression evaluation and conversion using stacks in your programs.

00:00 Introduction
02:18 Infix expressions
06:29 Q1 - Infix Evaluation
46:54 Prefix expressions
52:36 Q2 - Infix to Prefix conversion
1:09:11 Postfix expressions
1:11:14 Q3 - Infix to Postfix conversion
1:15:03 Q4 - Postfix Evaluation
1:26:28 Q5 - Prefix Evaluation
1:32:08 Q6 - Prefix to Postfix conversion
1:42:18 HW 7 - Postfix to Prefix conversion
1:42:35 Q8 - Postfix to infix conversion
1:50:40 HW 9 - Prefix to infix conversion
1:51:22 Q10 - Celebrity problem
2:18:48 Q11 - Sliding window maximum problem
3:10:13 Summary
3:10:50 Maza aa gaya?

For any Batch Related Queries Please Connect - 7019243492

1) Data science Masters 2.0

2) Full Stack Web Development 2.0

3) Java with DSA and System Design 2.0

📌 𝐏𝐇𝐘𝐒𝐈𝐂𝐒 𝐖𝐀𝐋𝐋𝐀𝐇 𝐎𝐓𝐇𝐄𝐑 𝐘𝐎𝐔𝐓𝐔𝐁𝐄 𝐂𝐇𝐀𝐍𝐍𝐄𝐋𝐒 :

📌 𝐏𝐇𝐘𝐒𝐈𝐂𝐒 𝐖𝐀𝐋𝐋𝐀𝐇 𝐒𝐎𝐂𝐈𝐀𝐋 𝐌𝐄𝐃𝐈𝐀 𝐏𝐑𝐎𝐅𝐈𝐋𝐄𝐒 :

#Stack #Infix #Prefix #Postfix #Java #DSACourse #CollegeWallah #PWSkills #PhysicsWallah
Рекомендации по теме
Комментарии
Автор

So vast content no one can do this hardwork only on one topic great salute 🙋

bonkai.movies
Автор

Wow! Hands down itna efforts for free content.
Thank you bhai, much appreciated.

ayushmishra
Автор

Sir, lecture dekh kar "maza aa gaya"...
Very very Helpful lecture...
Thank You Sir ❤

akashgautam
Автор

Its an awesome class ever found on stack data structures...thanks a lot raghav sir for such useful contents

CODEX-YASH_GUPTA
Автор

This content for free!!glad to see education must be free

vinodthakar
Автор

Maza aa gaya

Easy and west raghav sir is the best all time

aakibsatvilkar
Автор

1:14:39

don't worry if you are not able to understand in first time, i have watched the lecture twice now i am able to understand how the things are working !!!

Luffy_
Автор

What a great serious of dsa I have never seen, thank you sir

harshitgupta
Автор

Awesome 😎😎😎 kya mst teaching skill hai sir..🙏 great teacher/coder
Thank you Etna dharya se pdhane ke liye❤❤

Byte_Beacons
Автор

1:38:36
home work question : )

String str = "953+4*6/-";

Stack<String> stack = new Stack<>();

for(int i=0; i<str.length(); i++){

char character = str.charAt(i);
int ascii = (int)character;

if(ascii>=48 && ascii<=57){
String value = "" + character;
stack.push(value);
}

else {

String v2 = stack.pop();
String v1 = stack.pop();

stack.push(character+v1+v2);
}
}

Luffy_
Автор

Thankyou Sir💙
For providing new One💙💙

shashi_creator_
Автор

thankyou so much sir i from nepal better than clz lacture

PranilBasnetKshetri
Автор

Dhasu lecture hai sir aapke majja aa gaya

shivanikantak
Автор

1:40:35 we can use an inbuilt string function StringValueOf() to typecast it into string

svedits
Автор

1:28:48 logic
jo phle number hoga wo infix ka left side se chalu hoga (v1) agar niche wale ko v2 ki jgh v1 bana denge to ordering kharab ho jayegi
or jo evaluate kar rhe hai wo glt ho jayega

prefix mai loop ulta isliye chal rha kyo ki prefix mai jo operators hote hai wo hamesha left side me hote hai OP_V1V2
agar ulta loop chalyenge to number phle dal payenge or evauluation ho jayegi agar agey se karenge to operators a jaeyga par unke corresponding numbers ni milenge or glt evaluate ho jayega
but piche se karenge to to shi hoga jaise hi number ke bad operator ayega wo usi number ke corresponding hoga to evaluation mai gadbad nhi hogi

hope this clear the doubts !!!

Luffy_
Автор

is me concept essa hota hai
1) infix-
infix to total number sum
infix to prefix conversion
infix to postfix conversion

2)prefix -
prefix to total number sum
prefix to postfix conversion
prefix to infix conversion

3)postfix -
postfix to total number sum
postfix to prefix conversion
postfix to infix conversion

ye sab karn a hogha ?

ApnaDSA
Автор

1:50:49
homework : )

String str = "-9/*+5346";

Stack<String> stack = new Stack<>();

for(int i=str.length()-1; i>=0; i--){

char character = str.charAt(i);
int ascii = (int)character;

if(ascii>=48 && ascii<=57){
String value = "" + character;
stack.push(value);
}

else {

String v1 = stack.pop();
String v2 = stack.pop();
String value = '(' + v1 + character + v2 + ')';
stack.push(value);
}
}



Luffy_
Автор

Sir ye infix to post and infix to pre me all examples ke sath nahi Correct ans de raha hai😢😢😢

Mandar-ouyp