As a hearing impaired beginning programmer, I want to thank you sincerely for the captions. You have just earned a subscription from me, which is unique given that I don't have any other subscriptions. Keep up the great work.
1. Check your English Before Commenting. 2. One can watch UA-cam videos irrespective of the fact that the thing is being taught in their country. 3. Stop spamming UA-cam with foolish comments.
OMG whoever did and organize this tutorial God will bless him. I have went through 13 executive tutorials on stack i still didn't get it, but once i watch this video, it's as if the tutor transfered the knowledge to my brain straight LOL. Once again thank you, am subscribing.
I really appreciate how you give me the words to describe the connection between the pseudo-code and Big O notation. For ex. "two scenarios in a push operation," then you show the details between constant time for a normal push operation then O(n) for an overflow correction using a larger array. Next you say "the time complexity of push with this strategy" O(1) in best case, O(n) in worst. Plus the pseudo-code really helps!
Great tutorial and nice accent, easily understandable. U reduced my work to Google a lot and then go through too many pages to understand these concepts for my College viva.
One good thing is that while explaining the data structures not any particular language is used so it is easy for any language study to watch this video
I have gone through all your data-structures videos and I really like the way you explain. I appreciate the content as well as the clarity of the voice and flow.
Hi, I consider myself rather green when it comes to programming and I have legit no idea what my professor has been teaching until I found this video. Thank you so much for your clear explanation. :) This video is super helpful!
Your videos are great! Thanks for the clear explanations, as my current CSC-250 professor doesn't give us much information on these forms of data structures.
@@VinayKumar-vm1hg In most programming languages, the arrays are implemented as 0 based index. Let's say there are 2 elements in an array, so its max_size = 2, and there are only two indices - 0, 1. So the variable top should be equal to 1, hence top = max_size-1;
This video is very helpful.I was going hardtime for perceiving the concepts.And I got poor marks.Now I have started to understand by Mercy of Allah.Thanks a lot for this video.
@@075_ritikkumar7 It is always Allah (The One and Only God) who always helps me for everything. He is the Rahman( The beneficent)has created us from mingled sperm. I also thanked this tutor who has helped me. But if I loose my brain power ,then this tutor can help me no more despite his talent. Because I was depressed for many years. Even I was going to attempt suicide .At that time, it was hard for me to study and understand hard concepts. Fortunately, Allah guided me through HIs Scripture 'The Quran' and helped me to overcome my depression. Finally, I have found a new meaning of my life.
No word for this kind of knowledge,simply fr m the best in the world ,where are u sir plz comeback we want more videos from you,plzzz sir help u truly the best in the world.
My wish is to free and quality education for all. I don't know how many of you are doing this work. But I wish to God to give a healthy and prosperous life to all of you. Bcoz you r doing a great work. Plz make more videos. You know about India's privet college. they are just useless. You have a great quality to teach everything in simple way. Plz help me help us to become a Good engineer from privets college. We want more videos. Plz make more videos.
For n pushes, cost of copy should be 1 + 2 + 4+....+ (n/4) + (n/2), because when the stack is overflowed on trying to push the ((n/2) + 1)th element, it creates another dynamic array of size n, which can contain all n pushes. So, why did we include 'n' in the cost?
In the top function, where the line " return A[top]; " is there, the compiler throws out an error that "array subscript is not an integer". And yes, my function starts with int, not void.
Making continuous command line type input for continuous push and pop operations in a stack in cpp. Enter operation push, pop or exit and press enter, then enter the number for push operation to exit enter command exit ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #include #include using namespace std; #define max_size 6 int top, arr[max_size]; void display() { cout
I think you forgot to include in the description the other array based implementation of stack in C. you only included the github link to the source code you wrote in the video.
just a question, how exactly do you create a new array when an array is full? we can't create a new node like what we did in linked list since these arrays are located in stack part of the memory, where linked list is in the heap, correct? I mean, we can't write if(top == max_size)-1{ int B[max_size*2]; or new B[max_size*2]; } even if it's possible, when B is maxed out, there will be no int C[max_size*3]. any enlightment?
Hi MyCodeSchool Instructor. I am having some trouble in my code. I don't know why but I'm getting a stack overflow error when I try compiling this code. Would you be able to compile it on your end and let me know what might be the issue. My source code is exactly the same as yours. // Stack -- Array based implementation #include #define MAX_SIZE 5 int A[MAX_SIZE]; int top = -1; void Push(int x) { if (top = MAX_SIZE - 1) { printf("Error: stack overflow "); return; } A[++top] = x; } void Pop() { if (top == -1) { printf("Error: No element to pop "); return; } top--; } int Top() { return A[top]; } void Print() { int i; printf("Stack: "); for (i = 0; i
I think you might have figured it out by now but in your push function inside the if condition, you have used assignment operator(=) instead of relational operator(==).
The tutorial is from 2013, and I am from 2021, seems like it will never get old. God bless you
g old
2023 anyone?😅
2024 end
@@vineetk1998 Yessss
As a hearing impaired beginning programmer, I want to thank you sincerely for the captions. You have just earned a subscription from me, which is unique given that I don't have any other subscriptions. Keep up the great work.
Jamaika I am very glad that you are getting helped. :)
+Jamaika (y) THIS COMMENT MADE MY DAY :D
why ? doesn't c taught in ur country?
Sonu Sonu sabse yahin puchega?
1. Check your English Before Commenting.
2. One can watch UA-cam videos irrespective of the fact that the thing is being taught in their country.
3. Stop spamming UA-cam with foolish comments.
OMG whoever did and organize this tutorial God will bless him. I have went through 13 executive tutorials on stack i still didn't get it, but once i watch this video, it's as if the tutor transfered the knowledge to my brain straight LOL. Once again thank you, am subscribing.
Your video makes the internet a better place
Matheus Lacerda so agreed
Anyone else feel like you learned more from this than in college?
Array Stack of Winterfell.
+Vlad Albescu up u go
Ded
valar mugulish
THE NORTH REMEMBERS....
legend
Thank you for making this video. Explanations from others didn't get me to understand this concept as thoroughly as yours did.
I really appreciate how you give me the words to describe the connection between the pseudo-code and Big O notation. For ex. "two scenarios in a push operation," then you show the details between constant time for a normal push operation then O(n) for an overflow correction using a larger array. Next you say "the time complexity of push with this strategy" O(1) in best case, O(n) in worst. Plus the pseudo-code really helps!
This makes stacks so easy to understand. No wonder people like them so much. So useful, especially if you make a struct out of it.
Great tutorial and nice accent, easily understandable. U reduced my work to Google a lot and then go through too many pages to understand these concepts for my College viva.
The clearity of your words just blew my mind.keep you work on
The tutorial is from 2013, and I am from 2023, seems like it will never get old. God bless you
One good thing is that while explaining the data structures not any particular language is used so it is easy for any language study to watch this video
You're explanation is clear and concise. Far superior to the text provided with our course. Thank you.
please check the details
I have gone through all your data-structures videos and I really like the way you explain. I appreciate the content as well as the clarity of the voice and flow.
Sir You bring my Confidence Back.....Thank you a Lot...for all of your Videos
Hi, I consider myself rather green when it comes to programming and I have legit no idea what my professor has been teaching until I found this video. Thank you so much for your clear explanation. :) This video is super helpful!
One of the talented person who knows data structures as mother tongue
he will be the only reason i pass my examination
Your videos are great! Thanks for the clear explanations, as my current CSC-250 professor doesn't give us much information on these forms of data structures.
Tommorow's my final.Bless you 😂😂
I really don't understand why few disliked, this made me understand concepts of stack well.
This helps so so so much!! Thank you for the clear explanation.
We wish that too :)
Sir how top=max_size-1
@@VinayKumar-vm1hg If you understood please explain it to me as well.
@@VinayKumar-vm1hg In most programming languages, the arrays are implemented as 0 based index. Let's say there are 2 elements in an array, so its max_size = 2, and there are only two indices - 0, 1. So the variable top should be equal to 1, hence top = max_size-1;
Still the Best Tutorial in the platform
This is the best explanation i could ever get on array implementation of stack. thank you very much
This video is very helpful.I was going hardtime for perceiving the concepts.And I got poor marks.Now I have started to understand by Mercy of Allah.Thanks a lot for this video.
Har cheej me allah ko ghusa do. Thank to this great tutor , not allah.
@@075_ritikkumar7 It is always Allah (The One and Only God) who always helps me for everything. He is the Rahman( The beneficent)has created us from mingled sperm. I also thanked this tutor who has helped me. But if I loose my brain power ,then this tutor can help me no more despite his talent. Because I was depressed for many years. Even I was going to attempt suicide .At that time, it was hard for me to study and understand hard concepts. Fortunately, Allah guided me through HIs Scripture 'The Quran' and helped me to overcome my depression. Finally, I have found a new meaning of my life.
@@075_ritikkumar7 Allah is the most wise.He created everything with exact meaaure through His knowledge He has knowledge about both seen and unseen.
@@075_ritikkumar7 Try to respect every religion. And before commenting also read scripture of respective religion
Thank you so much sir! You're an inspiration for new tutors like me🙏
give this man a medal
No word for this kind of knowledge,simply fr m the best in the world ,where are u sir plz comeback we want more videos from you,plzzz sir help u truly the best in the world.
Your top function has a bug. It will crash if we have an empty stack. At 11:25.
add if condition to check if it is empty
#include
#include
#define max_size 101
int a[max_size];
int top=-1;
void isempty()
{
if(top == -1)
{
printf("error: stack is empty ");
return;
}
}
void push(int x)
{
if(top == max_size -1) // handles stack overflow
{
printf("error: stack overflow
");
return;
}
top++;
a[top] = x;
}
void pop()
{
if(top == -1)
{
printf("error: no element to pop
");
return;
}
top--;
}
int Top()
{
isempty();
return a[top];
}
void print()
{
isempty();
int i;
printf("stack: ");
for(i=0;i
You are absolutely amazing man !!
thanks for this good explanation and clearing the concept
so easy! you did a better job than my professor...
My code school,
just simply rocks........
i can feel the dedication from your each word.thank you for the information.i killed the subscribe button .#feeling informative with my code school
keep doing it. it is really work as helping hand for many of us..thank you.
All the lessons are great!
Thank you!
please check the details
thanks bro I understood the topic very well you earned yourself a subscriber
i really wish that you guys had started this video-makings a year before !!
Nice video dude!! It helped alot, keep up the great work
Sir this is very very clearly and amazingly explained video
Thank u very much
My wish is to free and quality education for all. I don't know how many of you are doing this work. But I wish to God to give a healthy and prosperous life to all of you. Bcoz you r doing a great work. Plz make more videos. You know about India's privet college. they are just useless. You have a great quality to teach everything in simple way. Plz help me help us to become a Good engineer from privets college. We want more videos. Plz make more videos.
please check the details
Thankyou so much. Now i can Write Stack code on my own
4:10 - "We do not care what garbage lies there" Hahaha
mean bully
I think you are the one with the garbage face and you're trying to feel good by posting sh*t in the internet.
Get a life man.
Grove Street calm your balls
By garbage ,he meant garbage value , that is a typical word in programming vocabulary ,used to describe unwanted value /data .
Garbage value is a thing!!
@@user-mc1eb1sg5x wtf💀💀💀🤣🤣🤣 you okay my guy?
u r d best in dis business :) thankyou soo much for such beautiful and easy to understand explanations :D
#appreciate#your#work :)
u saved me from my exam thx a lot bro
this explanation helped me a lot sir. thank you very much
Just what I need, thank you for your informative video
Perfect teaching..Finally i learnt tq u so much..
please check the details
Really loved your lectures bro 😊 .. helpful
For n pushes, cost of copy should be 1 + 2 + 4+....+ (n/4) + (n/2), because when the stack is overflowed on trying to push the ((n/2) + 1)th element, it creates another dynamic array of size n, which can contain all n pushes. So, why did we include 'n' in the cost?
so for n+1 elements, you''ll have to include n
thank you man , this was very helpful. God bless you.
Thanks Sir. it helped me a lot.
Your videos amazing man , thanks for sharing them they help a lot. Keep up good work =)
explanation is done very well... thanks
Nice explanation man
This is a Indian youtuber ... So finally we can say that WE INDIA WE WIN...
RIP HUMBLEFOOL...😢😢🙏
2:10 for empty array, index is -1...bc of imaginary array
really u saved my day man a big thank for u
The top function will return the element at the top of the stack. So in push function top==MAX-1 might be true even if stack is not full
please check the details
amazing woaww i learn first time from your this tutorial and understand stack with array too much easily thansk sir
please check the details
In the top function, where the line " return A[top]; " is there, the compiler throws out an error that "array subscript is not an integer". And yes, my function starts with int, not void.
fabulous explanation...
Thank you. God bless you. Keep it up.
thank u for mathematical explanation
here is an exercise print the stack LIFO(last in first out) style to make it a real stack.
I've been watching EVERY video about to understand the pop( ) concept, and NOW I'm finally understanding what happens to the number after the pop( ).
thank you very much,wish u wer my lecturer
Making continuous command line type input for continuous push and pop operations in a stack in cpp.
Enter operation push, pop or exit and press enter, then enter the number for push operation
to exit enter command exit
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#include
#include
using namespace std;
#define max_size 6
int top, arr[max_size];
void display()
{
cout
Thank you very much! I have been trying all over again to creat something similar without any success!!! THANK YOU!!!! You helped me a lot!
int countChar(char*, char);
int main() {
char string[50];
char letter;
cout
love your voice man 💯
I am becoming a big time fan of your lessons. Do you have any lesson on AVL ? I was not able to find one from your list.
awesome tutorial ,pls keep more videos on trees and graphs in c++(oop) language
awesome tutorial of DS .. thnku so much.. :)
but i want to see implementation using java too
Legends watching in 2024😂😂
Very understandable,,,,,,,,,,,
in case of IsEmpty() method, just return top == -1 without if and else statements
thanks good explanation,sir which microphone do you use for recording.
I think you forgot to include in the description the other array based implementation of stack in C. you only included the github link to the source code you wrote in the video.
simple and clear...just awssm
You are God @mycodeschool. One more thing I wanted to ask from about 9:30, do you guys also hear weird breathing in the sound of the video?
Shouldn't the best case and average case be represented using Omega and theta rather than Big O notation? (time - 8:01)
IsEmpty()
{
return top==-1;
} // is much cleaner...Awesome videos nonetheless.
Good explanation
Why the larger array is take only the double of the smaller array?Why not 3 or 4 times ?
There is no certain reason for that. You can make larger array three or four times.
please check the details
really nice job, u helped me a lot
just a question, how exactly do you create a new array when an array is full? we can't create a new node like what we did in linked list since these arrays are located in stack part of the memory, where linked list is in the heap, correct?
I mean, we can't write
if(top == max_size)-1{
int B[max_size*2]; or new B[max_size*2];
}
even if it's possible, when B is maxed out, there will be no int C[max_size*3].
any enlightment?
very good, thanks
for(i=0; i
thank u so much..i am very grateful to you
Thanks ...excellent video ..
Thank U Very Much Bro !! :D
Amazing video Buddy :)
Earned a subscription from me TOO :)
very clear. thank you!
Thank you sir 😊
thank you a lot!!! a great series!
Hi MyCodeSchool Instructor. I am having some trouble in my code. I don't know why but I'm getting a stack overflow error when I try compiling this code. Would you be able to compile it on your end and let me know what might be the issue. My source code is exactly the same as yours.
// Stack -- Array based implementation
#include
#define MAX_SIZE 5
int A[MAX_SIZE];
int top = -1;
void Push(int x) {
if (top = MAX_SIZE - 1) {
printf("Error: stack overflow
");
return;
}
A[++top] = x;
}
void Pop() {
if (top == -1) {
printf("Error: No element to pop
");
return;
}
top--;
}
int Top() {
return A[top];
}
void Print() {
int i;
printf("Stack: ");
for (i = 0; i
I think you might have figured it out by now but in your push function inside the if condition, you have used assignment operator(=) instead of relational operator(==).