3.2 Implementation of Stack using Array | Data Structure and Algorithm Tutorials

Поділитися
Вставка
  • Опубліковано 7 вер 2019
  • Here I have discussed Array based Implementation of Stack data structure. Explained all the operations(push, pop, peek, traverse) with C program.
    DSA Full Course: https: • Data Structures and Al...
    ******************************************
    See Complete Playlists:
    C Programming Course: • Programming in C
    C++ Programming: • C++ Complete Course
    Python Full Course: • Python - Basic to Advance
    Printing Pattern in C: • Printing Pattern Progr...
    DAA Course: • Design and Analysis of...
    Placement Series: • Placements Series
    Dynamic Programming: • Dynamic Programming
    Operating Systems: // • Operating Systems
    DBMS: • DBMS (Database Managem...
    *********************************************
    Connect & Contact Me:
    Facebook: / jennys-lectures-csit-n...
    Quora: www.quora.com/profile/Jayanti...
    Instagram: / jayantikhatrilamba
    #jennyslectures, #datastructures #stack

КОМЕНТАРІ • 688

  • @arunodaykumar1273
    @arunodaykumar1273 4 роки тому +392

    mam, you are one of the best instructors of data structures...

  • @saijaswanth5085
    @saijaswanth5085 4 роки тому +394

    pop("college stuff");
    push(" jayanthi mam stuff");
    thanks mam

  • @bhadreesh787
    @bhadreesh787 4 роки тому +79

    Hi Jayanti ma'am now you are like a GOD for so many of the Students, because in our India @ Degree Colleges so many of the Professors themselves they will not be knowing even the BASIC CONCEPTS also, only few Professors like you will be Excellent..We need Professors like you @ clgs..Love you ma'am as your Student😘😘😍

  • @aditishaw2697
    @aditishaw2697 3 роки тому +25

    Ma'am, you are one of the best teachers I've ever known. You've made it so easy for me to understand all the stuffs that my school teacher made so difficult. Thank you so much ma'am.

    • @inger6390
      @inger6390 9 місяців тому

      And u r one of the best beautiful girl ever see in the UA-cam 😍🥰

  • @nandinikumari586
    @nandinikumari586 2 роки тому +143

    Implementation in C:
    #include
    #define N 5
    int stack[N];
    int top=-1;
    void push()
    {
    int x;
    printf("Enter data:");
    scanf("%d",&x);
    if(top==N-1)
    {
    printf("Overflow");
    }
    else
    {
    top++;
    stack[top]=x;
    }
    }
    void pop()
    {
    int item;
    if(top==-1)
    {
    printf("Underflow");
    }
    else
    {
    item=stack[top];
    top--;
    }
    printf("%d
    ",item);
    }
    void peek()
    {
    if(top==-1)
    {
    printf("Stack is empty");
    }
    else
    {
    printf("%d
    ",stack[top]);
    }
    }
    void display()
    {
    int i;
    for(i=top;i>=0;i--)
    {
    printf("%d\t",stack[i]);
    }
    }
    void main()
    {
    int ch;

    do
    {
    printf("Enter choice for operation: ");
    scanf("%d",&ch);
    switch(ch)
    {
    case 1:
    push();
    break;
    case 2:
    pop();
    break;
    case 3:
    peek();
    break;
    case 4:
    display();
    break;
    default:
    printf("Invalid choice");
    }
    }while(ch!=0);

    }

    • @waniyazulfiqar2181
      @waniyazulfiqar2181 Рік тому +1

      Can you implement this in java please

    • @chandrikatallam3083
      @chandrikatallam3083 Рік тому

      Out put please

    • @Itz_Armaan03
      @Itz_Armaan03 Рік тому +5

      Can someone tell me why we take n-1
      if(top=n-1)
      Why not
      Top=n

    • @kallurishyamsundhar7195
      @kallurishyamsundhar7195 Рік тому +9

      @@Itz_Armaan03 bcz if stack size is 6 ,then its index starts from 0,1,2,3,4,5 so highest(last) index is 5,but the size is 6 thats the resaon we put top=n-1
      top=5 means it reaches maximum size ,i think this will clear your doubt

    • @manasrastogi5948
      @manasrastogi5948 Рік тому

      Thanks a lot for this program

  • @bikrammajhi3020
    @bikrammajhi3020 Рік тому +4

    One of the simplest explanation on internet ! Thank you !! You earned a life long subscriber. Respect Mam. ☺

  • @gaganlovejesus07
    @gaganlovejesus07 Рік тому +14

    I am very lucky to find this video and having you as my teacher.

  • @dailydots3607
    @dailydots3607 8 місяців тому +7

    I m a lecturer at university. I learned teaching techniques from her ❤. She is amazing and really want to say thank you mam 🎉❤

  • @idlconferencecentreknust6648
    @idlconferencecentreknust6648 4 роки тому +12

    Jayanti, I can't thank you enough. You are simply phenomenal.

  • @anjalityagi3442
    @anjalityagi3442 3 роки тому +5

    Mam you are really a blessing for me in this pandemic.... when I need a teacher as like you....you resolve all my problems....
    Thankyou so much.....

  • @amangaitam7042
    @amangaitam7042 Місяць тому +1

    Semester exam in 1 hour,but feeling confident after watching your videos 😊

  • @mdeliyas8838
    @mdeliyas8838 Місяць тому

    Unbelievable explanation and i become addicted of watching this channel.
    thank you from Myanmar or Burma.

  • @clintontilahun5689
    @clintontilahun5689 4 роки тому +20

    thank you, we really appreciate this.
    from Ethiopia.

  • @sallydeen7772
    @sallydeen7772 3 роки тому +31

    Thank you soo much, I've got an exam coming up and you saved me😍 and I'm sure so many more students like me. Your explanation method is soo crystal clear. Thank you.
    Love and Respect,
    From Sri Lanka.
    Thank you ma'm

  • @Jyo-go7gj
    @Jyo-go7gj Місяць тому

    mam, a standing salute for the effort you put into these videos, your teaching is simply amazing, even after 4 years people are relying on your videos, because no matter in which colleges we are , lecturers now a days don't take the burden of making things clear, and they expect us to understand everything without explaining what actually happens there....thank you from the bottom of my heart for the lectures mam ❤

  • @sushmitapaul566
    @sushmitapaul566 4 роки тому +120

    Not my professor but you deserve my semester fees for ds algo

    • @sanasayyad1872
      @sanasayyad1872 11 місяців тому +4

      For real u are the best professor 😭😭

    • @infobits1886
      @infobits1886 10 місяців тому +1

      Like comment and subscribe with respect and do something in life .. mam will get proper value of her time .. 🙏

    • @niranjanreddy7022
      @niranjanreddy7022 8 місяців тому +1

      Yes

    • @tahacreator5304
      @tahacreator5304 7 місяців тому +1

      Ha paid kr do

    • @akashsarkar1040
      @akashsarkar1040 6 місяців тому

      Which clg from u belong , plz say me , I will not admit my child in that clg

  • @miraklet_20
    @miraklet_20 3 роки тому +24

    Your lectures are really helpful during examination time mam... Thank you

  • @yashwantbasnett2294
    @yashwantbasnett2294 3 роки тому +2

    Very very helpful videos....
    It's not that our teacher does not teach us well but he does not elaborate properly so it's hard to understand but after seeing your lectures my all doubts are cleared so thank you very much😊

  • @ramakrishnagkannari8714
    @ramakrishnagkannari8714 3 роки тому +6

    Extraordinary ma'am. It was so clear. Full concept was made easy to understand..
    Thank you so much

  • @ankurofficialyt1419
    @ankurofficialyt1419 4 роки тому +1

    Oh I Like The Way 😊 When U Teach Us in your own Style . you Are Great Teacher I Understand Everything Whatever U Teach Us 🙏. Thank You Mam.

  • @ritiks.hujwant3816
    @ritiks.hujwant3816 3 роки тому +15

    Thank you mam for such a wonderful explanation.... It will be more blessings for us if you would start making videos on different competitive coding problems and algorithms.☺️

  • @himabindu9036
    @himabindu9036 4 роки тому +9

    Mam ur lectures are simply awesome. I am following all your vedios.looking forward for more vedios for software engineering and theory of computation , cloud computing, network security as well madam

  • @vishwabhatt20
    @vishwabhatt20 4 роки тому +3

    ma'am i'm literally in love with your explanations..all the stuff which our clg faculty teaches us in the lecture...i think sub-consiously at that time that will this topic be found on your channel?....im looking for learning the entire C frm your videos..i hope i will soon be able to do that! Thank you. love love❣❣❣💖

  • @TeckShivam
    @TeckShivam 9 місяців тому +1

    I Really Like Your Simple and Understandable way of Teaching Thank you I Had Watched Full And Now I Know the Stack Very Well thank You Once Again 🙏🙏🙏

  • @hira5709
    @hira5709 3 роки тому +5

    Awesome teaching Mam ....Thanks A Lot for explaining everything in detail...........Your lectures are really helping me ...😊

  • @cobbyanimics
    @cobbyanimics 9 місяців тому

    After going through a lot of resources, i remembered Aunty Jenny makes it easy so i decided to come here and truly truly, my ma'am didn't disappoint : )

  • @data_stats
    @data_stats Рік тому +1

    Ma'am understands student's mindset more than students
    Great lecture
    Thankyou ma'am 🙏🙏

  • @bikrammajhi3020
    @bikrammajhi3020 11 місяців тому +3

    Simply the best on UA-cam.

  • @surbhimishra2015
    @surbhimishra2015 3 роки тому +1

    Thank you thank you so much ma'm my practical exams are there from tomorrow and from your videos I understand everything 👍👍❤️❤️❤️

  • @purodhachanuthika5898
    @purodhachanuthika5898 3 роки тому

    4 days to the final exam and now i'm getting this as nothing ..... thank you maam this is really helpful .........love from Srilanka

  • @misturaojulari9707
    @misturaojulari9707 Рік тому +1

    You have just blown my mind! Thank you for making this hard-to-grasp concept exciting and understandable

  • @SulemanKhan-nn9uc
    @SulemanKhan-nn9uc 4 роки тому +4

    Hello... Today i saw your video for the first time and found such a great stuff which i am looking for... Great teaching method 👍👍.. I am subscribing your chanel and hoping for some new good stuff... If u saw this comment then plzz reply😊

  • @VishalSoni-eq7fr
    @VishalSoni-eq7fr 6 місяців тому

    Thank You So Much Ma'am , these lectures are very easy to understand . Great work and keep it up !

  • @atkuriajaykumar3701
    @atkuriajaykumar3701 4 роки тому

    thankyou madam if you have uploaded this video 4 years back .I would have scored more marks in this subject.Not so late now it is useful for my placements thankyou madam

  • @jatinhajela8873
    @jatinhajela8873 3 роки тому +1

    Thanku mam... Tomorrow is my pre university exam... I am very much worried about this... Topic.. But after taking your lecture.. Now I feeling confident😊

  • @sriramsriram5015
    @sriramsriram5015 2 роки тому

    Wow....bravoo..🔥🔥🎉...such an awesome teaching with simple english...very much easy to understand...thanq mam...😍

  • @motivationalspot1448
    @motivationalspot1448 3 роки тому

    the most amazing thing is using some urdu/hindi words like "NAW' , "is me" ... you are a good teacher.. would love to meet uh if india issues a visa for meh hehehe.

  • @nareshthakare1217
    @nareshthakare1217 4 роки тому +9

    Thanks mam 😊 for u r stack & array lecture... Its really great effort u have taken... Mam a small request .... Can u please create playlist on c++ computer language learning... It will be great help for me and my friends and many of the students too... Thank you so much mam 😊...

  • @03sahbanalam61
    @03sahbanalam61 4 роки тому +3

    My doubts finally got cleared...Thank u so much mam😊😊

  • @stech3696
    @stech3696 3 роки тому

    You are a great ma'am .you are very simple teaching the data structures and very few teacter in india

  • @RahulSingh-eq2xk
    @RahulSingh-eq2xk 3 роки тому +24

    Thanks alot ma'am🙏😍 I had studied whole stack and tree with in one night and the very next Morning I score 55+ out of 77 in theory paper of 12 th premilary exam 😎

  • @saramrehmani9955
    @saramrehmani9955 3 роки тому +1

    very deeply discussed every topic.Keep it up
    Well delivering knowledge

  • @shubhamverma865
    @shubhamverma865 3 роки тому +1

    I am searching this concept last 1 week finally i got thanks ma'am

  • @aishwarya1895
    @aishwarya1895 3 роки тому +5

    I was trying to learn stack since last four days.... Didn't understood anything
    But after watching your videos....yeah I can say that i understood this... Thanks mam☺

  • @dixitnadda3380
    @dixitnadda3380 3 роки тому

    Ma'am how to set(or point) 'top' variable at uppermost element when stack is partially filled in order to push an element?

  • @deepakanand8699
    @deepakanand8699 2 роки тому

    My guardian angel for my lab internals...... thank you soo much mam......

  • @Ali_bhai906
    @Ali_bhai906 3 роки тому

    amazing explanation mam..God bless u....love from Ladakh .kashmir

  • @kashishvarshney3019
    @kashishvarshney3019 Рік тому +1

    helo mam? i want to ask that jab mene is code ko implement kiya toh mere output me jo 3 element wo repeat ho rha h aur 2 baar aarha h so what is that mistake?please see this and answer this

  • @nitinkr.1790
    @nitinkr.1790 3 роки тому +1

    your explanation is crystal clear mam. Thanks for your efforts

  • @prathamtanwani4276
    @prathamtanwani4276 3 роки тому

    It is really tough to understand the way you use to teach but thanks as you have made these lectures

  • @miheerhasabnisd3930
    @miheerhasabnisd3930 2 роки тому

    Thanks mam for the video, your videos are best on youtube for data structures and algorithms

  • @NASA-SpaceVision
    @NASA-SpaceVision Рік тому

    Thanks a lot mam i am very thankful to you.
    i have learnt implementation of stack and queue. Your method of teaching is so good.
    Keep it up. Make more informative videos.

  • @DR-wp9ol
    @DR-wp9ol 3 роки тому

    Thank You so much Madam, Great Explanation !! from Sri lanka ❤

  • @zapeeosheikh
    @zapeeosheikh 2 роки тому +13

    Mam You are the Best .... I can't Express the Confidence you gave to me through this Lecture 🥺
    May You live Long and Healthy Life Ameen 💗

  • @vipul2994
    @vipul2994 4 роки тому +17

    amazing explanation, wished you were my class teacher for data stucture.
    thank you mam :-)

  • @Hybridakkufitness
    @Hybridakkufitness Рік тому +2

    hello mam!
    I am watching your videos for the first year from 1st sem now I am in 3rd sem still I study here I really understand everything thank you❤🌹🙏

  • @dimplegoyal8418
    @dimplegoyal8418 4 роки тому

    Really man when i see Ur video lctr..na chkr bhii pdhne ka mn krta h

  • @user-en4sl4lq4w
    @user-en4sl4lq4w 7 місяців тому

    I have enjoyed your data structure lessons so far

  • @muhammadtaha4567
    @muhammadtaha4567 3 роки тому +2

    Explained far better than university teacher. You are doing a good job. Keep it up!\

  • @Payal_Ojha
    @Payal_Ojha 6 місяців тому

    I salute your efforts miss ... I'm damn sure that your hard work will result in my placement one day...!!
    Thanks and love from Indore ❤❤

  • @Haasini_Satwika
    @Haasini_Satwika 4 роки тому

    You are simply great , you are way of teaching is great

  • @arunarun-cq9hx
    @arunarun-cq9hx 3 роки тому

    Mam ! I love the way of teaching and instructing .👍

  • @ManishKumar-rt5yn
    @ManishKumar-rt5yn 5 місяців тому +1

    Ma'am the way you teach is really amazing

  • @shanmukhteja3555
    @shanmukhteja3555 3 роки тому +1

    Mam u r just awesome ....
    U helped me to complete my assignment ☺️

  • @KajalKumari-pn7db
    @KajalKumari-pn7db 3 роки тому

    Mam ur videos clear my all doubts and ur explanation is too easy to understand

  • @hareeshdevarakonda9176
    @hareeshdevarakonda9176 3 роки тому

    Mam you are telling very good explanation about implementation of stacks using arrays...

  • @rajeshsahoo
    @rajeshsahoo Рік тому +1

    I think your video is changed my life ❤

  • @giteshrautela
    @giteshrautela 3 роки тому +2

    Before watching ur video, I think that stack is very hard to implement. But now my all doubts are clear about stack. And I can easily implement the stack by using array of c.
    Thank u mam!

  • @editxstudio5307
    @editxstudio5307 4 роки тому

    *_nice video mam....thank you so much for explaining in amazing way --_*

  • @akashddeepchitransh4537
    @akashddeepchitransh4537 3 роки тому

    Great teacher i have ever seen.......♥️

  • @user-jt7st6vn7r
    @user-jt7st6vn7r Місяць тому

    Thank you ma'am.... you helped me alot...❤❤...for my internal.

  • @Jananjr
    @Jananjr 2 роки тому

    Marvelous teaching mam I understood it crystal clearly👍

  • @rahulrengarajan4091
    @rahulrengarajan4091 7 місяців тому

    Mam Nice teaching of data structures really a respect and my humble from Tamil nadu🥰🥰🥰🥰

  • @supertrick2818
    @supertrick2818 3 роки тому

    Thanks you so much mam for making easy to understand this concept 🙏🙏🙏

  • @akashdeepchauhan5
    @akashdeepchauhan5 4 роки тому +1

    lovely, explaination.
    actually , mam i want to read all my subjects from you, because i could not understand anything except your lectures.
    And at last Iove you.

    • @ha-il9bd
      @ha-il9bd 4 роки тому +1

      🤯😂😂

  • @jakevinas9209
    @jakevinas9209 Рік тому

    how will you get the sum of the element in the stack?

  • @sasikirankakara3773
    @sasikirankakara3773 4 роки тому +3

    Mesmerizing Teaching mam really awesome mam!!!

  • @157_anweshasahoo7
    @157_anweshasahoo7 2 роки тому

    Thank you mam for make this video. Your lecture videos are so helpful and nice.

  • @kulveerkaur9594
    @kulveerkaur9594 2 роки тому +4

    Thank you so much mam for brilliant lectures 🥰🥰

  • @ramyac29
    @ramyac29 8 місяців тому

    I got a very good explanation of ds from your videos thank you so much ❤

  • @joydeepchatterjee6096
    @joydeepchatterjee6096 4 роки тому

    Mam u r so pleasing , and your teaching is awesome

  • @giggty6109
    @giggty6109 4 роки тому +13

    Next level teaching mam😍
    Plz bring more FDS videos ... i am totally dependant on you🙂

  • @Tanmay860
    @Tanmay860 4 роки тому

    Thanks mam
    Your chanal is very helpful
    Your chanal is like to a gift for us!

  • @KajalKumari-pn7db
    @KajalKumari-pn7db 3 роки тому

    U r the best teacher of data structure

  • @jayprakashrout1429
    @jayprakashrout1429 4 роки тому

    Thank you mam I need it very much
    I can understand bette now than previous. Thank you

  • @JustForFun-xs3ko
    @JustForFun-xs3ko 3 роки тому

    Very nice explanation! Thanks a lot.

  • @Srihan_kumar
    @Srihan_kumar Рік тому

    Acha explanation ( mujhe smjh aa gaya) 👍

  • @sivaprasad16
    @sivaprasad16 3 роки тому

    With your lectures I am good in DS
    Thank u mam

  • @himabindu9036
    @himabindu9036 4 роки тому

    Awesome presentation and explanation

  • @sathiroy5146
    @sathiroy5146 3 роки тому

    Mam ,you are great. Lots of love and respect for you.

  • @natureandculture2280
    @natureandculture2280 3 роки тому +1

    Tqs madam really you will be done the great job free classes will be tell and also you will be the record also madam in youTube in future. A. K. J 🙂

  • @user-hi9px4fm5z
    @user-hi9px4fm5z 9 місяців тому

    in pop() function if i want to pop any middle element of the stack but after middle element all remaining elements i want to print then your code will not work . pop() function

  • @ajaynani4079
    @ajaynani4079 2 роки тому

    U are teaching iss sooo good mam , thanks for your good explanation 👍

  • @Shalynee82
    @Shalynee82 11 місяців тому +1

    Have Data structures exam tomorrow watching your video… Thank for your playlist😍

  • @Telugu770
    @Telugu770 Рік тому +1

    We love your way of teaching mam❤❤❤❤❤❤❤🎉🎉🎉🎉🎉

  • @Vishaltuts
    @Vishaltuts 4 роки тому +1

    Wahoo kya explanation hai. Mam
    Thanks mam

  • @02_vishakhabharambe61
    @02_vishakhabharambe61 2 роки тому

    Thanks ma'am your lectures really helped me a lot ❤

  • @goldenmystries3692
    @goldenmystries3692 Рік тому +1

    Thank you for great explanation and i have understood

  • @deekshithanethi4087
    @deekshithanethi4087 3 місяці тому

    Thankyou mam for your videos they are really very helpful, keep going... 👍👍

  • @retrt1736
    @retrt1736 Рік тому

    Thank you Mam!! The best teacher indeed :)