Stacks and Queues

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 พ.ย. 2024

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

  • @kiullsmith
    @kiullsmith 11 ปีที่แล้ว +17

    These tutorials are a savior to my life! Being a Comp Sci major with bad teachers and TAs these teach me more then my classes!

    • @derekbanas
      @derekbanas  11 ปีที่แล้ว

      Thank you :) I'm very happy I can help to explain what your teachers missed

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

      Jeramy smith can we chat private?

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

    I have constantly tried to find ways to make my videos better. Coupling them with learning apps felt like a great way to do that. I make enough money. I don't need anymore. I'm just happy that people are finding the videos useful

  • @abdallaelmedani2316
    @abdallaelmedani2316 9 ปีที่แล้ว +20

    Thank you for the marvelous work, Derek. Your style, speed and code accuracy is just amazing.

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      +abdalla elmedani Thank you for the compliment :) You're very welcome

    • @user-tk7sc4gz2v
      @user-tk7sc4gz2v 2 ปีที่แล้ว

      Agree with this for other videos but not this, major issue in code for queue size handling among other things. Size x, insert x elements, remove y elements and try inserting. (Ideally space should be there because we removed y elements but the code would throw exception)

  • @BuckstarrZ
    @BuckstarrZ 10 ปีที่แล้ว +43

    You are just THE BEST source for programming stuff on this planet, forget about the lectures given by our profs and tutors - you are the real deal.
    It's amazing how you just don't miss a thing, everything anyone could think of simply exists in your video collection. I wouldn't have it through my exam without this!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว +8

      Thank you very much for the kind message :) People like you are the reason why I continue making videos.

    • @scoobynicker
      @scoobynicker 10 ปีที่แล้ว +6

      I second what he said.
      I've been using you through the whole semester, almost every single day.

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

      Nick Steiner Thank you :) That is very nice to hear that I helped.

  • @SohCahToa30
    @SohCahToa30 10 ปีที่แล้ว +42

    Queues starts at 9:06

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

    I'm studying for my Data Structures midterm and I'm SO glad I found your channel! You have tons of videos on subjects that I'm super interested in and you are very good at explaining things clearly and quickly. Also, your videos are great and easy to follow. Thanks!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      MAGonzzManifesto Thank you for all the nice compliments :) Many more videos are coming.

  • @dmkerr
    @dmkerr 6 ปีที่แล้ว

    Just want to echo the many users over now several years: thank you so much for sharing your knowledge. You really do have a unique talent for clear instruction and example. I'm working my way through a few Java-based courses right now and each new chapter seems difficult or confusing until I watch and follow along with your video covering the topic.

    • @derekbanas
      @derekbanas  6 ปีที่แล้ว

      Thank you for taking the time to write such a nice message :) I greatly appreciate it !!!

  • @vericlese
    @vericlese 7 ปีที่แล้ว

    I'm so glad you exist in the world. My instructors give me tasks but you teach me how to learn java. Thank you for doing what you do!

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      Thank you for the nice compliment :) I'm very happy that I helped

  • @luckymesoup
    @luckymesoup 10 ปีที่แล้ว

    I finished school two years ago and sadly I haven't been in a programming role at my current job. I honestly feel like the saying "if you don't use it, you lose it" is true.
    Your tutorials have been a huge help in getting me back on my feet. Thank you!!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Thank you :) Keep at it. The world needs plenty of programmers. You'll find the job you're looking for.

  • @alohiyaalohiya7745
    @alohiyaalohiya7745 8 ปีที่แล้ว

    You are better than all of my C.S professors at college. Thanks man for these tutorials. You made this seem so much easier.

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      +Ankur Lohiya Thank you for the nice compliment :) You're very welcome

  • @iRtehKatz
    @iRtehKatz 11 ปีที่แล้ว

    I use your videos for studying. Very well made. So much easier than re-reading slides and chapters from books. I appreciate all the time you put into making these.

  • @MrJonathanRB
    @MrJonathanRB 10 ปีที่แล้ว

    Derek I really appreciated all the time, that you have been taking from your personal life to provide us such as great tutorials, I have not a lot of money to pay for teachers and all that stuff and you had been the greatest source of information regarding Java programing. God bless sir

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Thank you very much for the compliments :) There is no money required. I'm happy I could help. May God bless you as well.

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

    Thank you :) I'll show exactly how to do that when I cover how to make stacks and queues with Linked Lists. You made a great point, but you are getting a bit ahead of me.

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

    Thank you for taking the time to write such a nice message :) You're very welcome and may God bless you and your loved ones as well.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) I do my best to present the information in new ways. I'm glad they are helping.

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

    Stacks like a stack of drying dishes; You take the one on top off first. Queues are like a queue for a bus. First come first served.

    • @derekbanas
      @derekbanas  5 ปีที่แล้ว

      Thanks for helping others :)

    • @tyty21315
      @tyty21315 5 ปีที่แล้ว

      Derek Banas and thank you for helping me through university!

  • @hotmandead1
    @hotmandead1 9 ปีที่แล้ว

    Love your Coding Skills Sir,
    Especially the Easy Variables you use Solve half the Problem and the display methods just LOVE !

    • @derekbanas
      @derekbanas  9 ปีที่แล้ว

      hotmandead1 Thank you :) I'm glad you enjoy them

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

    Thank you :) As the tutorial continues I use them for sorting and other things. I hope they help

  • @timo113
    @timo113 10 ปีที่แล้ว

    Thank you for putting up these tutorials. You deserve to be commended for this.

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      You're very welcome :) The pleasure is all mine. I have met many wonderful people all over the world from doing this.

  • @JENNYLENE96
    @JENNYLENE96 10 ปีที่แล้ว

    Your presentations are very good and well put together.... You deserve an award for this...

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Thank you :) Appreciation is more then enough for me.

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

    He subido el video antes de acostarse. Estoy haciendo videos tan pronto como sea posible. Yo no esperaría que una todos los días a las 11 :)

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

    This is just what i needed. It's way more direct than my dry programming book. Subscribing!

  • @yayalunet
    @yayalunet 10 ปีที่แล้ว

    Thank you so much for all of these Java tutorials! You are honestly a lifesaver! :)
    In the past two hours I have learnt soooooo much, just from watching your videos!

  • @RatherBAnon
    @RatherBAnon 10 ปีที่แล้ว

    Very helpful, Derek.
    Learned a lot, and I deeply appreciate your contribution to the learning.

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Thank you very much :) I'm glad you found it useful.

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

    Thank you so much ! You're an inspiration for new tutors like me🙏

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) many more are coming as quickly as possible

  • @vborole
    @vborole 11 ปีที่แล้ว

    Derek, I must tell you this, you are doing a real good work with your videos, your way of explaining such complex concepts are simply the best. I like all your videos, thank you so much. Take care and god bless!

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

    Thank you :) Some day maybe I'll cover different topics again. I love to teach different topics. The programming stuff just come easy to me though because I have been doing this stuff all my life.

  • @gopalb6975
    @gopalb6975 10 ปีที่แล้ว

    Thank you so much Sir for doing all these your are providing best video tutorials in the planet

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Thank you very much for the nice compliment :)

  • @Juznik1389
    @Juznik1389 9 ปีที่แล้ว

    One night to finish my lab. YOU made it possible! Thank you so much! :)

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

      Kalle Great I'm glad I could help :)

  • @vivilee7290
    @vivilee7290 7 ปีที่แล้ว

    Your programming is amazingly proficient! I like all the algorithms videos.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    I wish you the best on your travels. The only traveling I've ever done is in books pretty much :)

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) I have been playing around with how I could provide homework and tools to reinforce the information. I'm working on a framework that I plan to use to make tablet / phone apps that will provide those tools. Don't worry they will be free. I'm planning to start making them over the coming months. It should be fun

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) Everyone is very nice to me and that is all I need.

  • @shubhamkahal2828
    @shubhamkahal2828 10 ปีที่แล้ว

    Thank you for taking the time to put up these tutorials, they are awesome and very appreciated!!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      You're very welcome :) I'm glad you like them.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    You're very welcome :) I'm glad you enjoyed the video

  • @NickSarahnCoco
    @NickSarahnCoco 10 ปีที่แล้ว

    Thank you so much for your great videos. You explain everything in such a clear manner. I look forward to watching all your videos.

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Thank you very much :) I appreciate the nice message.

  • @rujiahao4284
    @rujiahao4284 10 ปีที่แล้ว

    man, u did a really excellent job to illustrate every details! super helpful, I certainly cant understand if i only saw each video once, ;) thank u so much!

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      rujia hao Thank you for the nice compliment :) You're very welcome

  • @NickTunac
    @NickTunac 11 ปีที่แล้ว

    Great Idea. Make exercises after the tutorial. Just like in schools :P after the discussion there's an exercises about the lecture. Great tuts Derek.

  • @rahmanalifarishta4588
    @rahmanalifarishta4588 10 ปีที่แล้ว

    I just can't thank you enough for such knowledge packed videos

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      You're appreciation is all I require. I'm very happy that you enjoy the videos :)

  • @LoneStarVII
    @LoneStarVII 9 ปีที่แล้ว +5

    I think for this the 'sysout("PUSH " + input + " added to stack")'
    should be inside the if statement. If not what would happen hypothetically is that if the stack is full it's still going to print that the input was pushed, even though it's full.

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

      Lone Star VII Good point :)

  • @aks690
    @aks690 11 ปีที่แล้ว

    You are awesome Derek. These videos are a boon for interview preparations. 6 hour revision for the basic data structures!!..Thumbs UP..:-)

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

    Your push method will display two messages in case that the stack is full. One that the stack is full and one that the input was added. You had to put the last line inside the condition.

  • @brandedmagnus909
    @brandedmagnus909 7 ปีที่แล้ว

    Literally an entire semester in Computer Science summarized perfectly in 16 minutes.

  • @zeenpc5645
    @zeenpc5645 7 ปีที่แล้ว

    You are huge inspiration to me. Thank you for everything.
    Your programming skills, editing skills and a powerfull voice I can just dream about, make this videos perfect :)

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      Thank you for the nice compliment :)

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Yes stacks are very much part of how computers and compilers work on a basic level

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Yes I will cover most everything. The only issue I'm having is that some topics require knowledge of discrete mathematics. I'll do my best to make all of that understandable without making a tutorial on discrete math

  • @UziasLara
    @UziasLara 7 ปีที่แล้ว

    This is sure to help in my Data Structures & Algorithms class. Thanks.

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

      I hope it helps :)

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

    Holy crap, I kind of understand java now! Thank you sir.

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

      I'm happy I could help :)

  • @conairspy77
    @conairspy77 10 ปีที่แล้ว +5

    i keep thinking what happens when the front and rear keep moving down the array and eventually go out of bounds? If the Front starts at index 4 of a array that has the size 5, then when you add an element to it wouldn't it go out of bounds

  • @SuperMCToaster
    @SuperMCToaster 5 ปีที่แล้ว

    Hey man thanks for the video. It helped me a lot to get into stacks and queues. So it came, that I noticed a MAJOR mistake in your stack pop method. In line 45 you set the TopOfTheStack to -1 and also increment one down in line 47. In this case, it does not matter because you get your value printed out before but if you actually want to work with the method for advanced applications you always get the wrong output of always -1.

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

      What would be a fix to this error then? I’m genuinely curious.

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    I'm very happy that I could help :)

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

    You are great. I'm in my second semester of grad school, and after taking one semester of part 1 and 2 of core Java, and watching a few of your tutorials, you have given me confidence that I'll be OK in my Algorithms class this semester! Thank you. Please keep this going. Any advice you might have? Again, thanks! Also do you cover Discrete math?

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

      Thank you very much :) I'm happy the videos are helping. Sorry, but I haven't covered discrete mathematics yet

    • @charlesperry6408
      @charlesperry6408 7 ปีที่แล้ว

      Derek Banas Got it! Another question, do you have any videos where you actually compare algorithms using graphs and the "Big Oh" notation? Or Algo analysis in general? Again, the code is great stuff!!!!

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      Yes I cover Big O here th-cam.com/video/V6mKVRU1evU/w-d-xo.html

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    What are you looking for? Like exercises in text books? The only problem is that I don't have time to solve all of them, but I could give exercises that you should be able to solve if that works

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) I try to do my best.

  • @Nikhil-fm4ii
    @Nikhil-fm4ii 7 ปีที่แล้ว

    one advice although a small one if you are taking input from the terminal using scanner use scanner object on nextLine() instead of next() method call as next will only pick the first word however we would want the entire line to be used and hence should use nextLine().

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :) I have to cover other common interview questions that I don't cover here and in the design patterns tutorial

  • @MexterO123
    @MexterO123 11 ปีที่แล้ว

    You saved this CS students butt, thanks dude. I'm never procrastinating on my CS projects again. Let me tell you that. : D

  • @deanbartolo3244
    @deanbartolo3244 8 ปีที่แล้ว

    This is extremely helpful, job well done !

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว

      +Dean Bartolo Thank you very much :)

  • @mikebrow6259
    @mikebrow6259 11 ปีที่แล้ว

    You are very good at this! You deserve a hug and HUGE pile of money :)

  • @manohars211
    @manohars211 9 ปีที่แล้ว

    Thanks for all the tutorials! Its crisp, clear and excellent. Btw, what is the first sentence you always say in your videos? I couldn't decode that completely :)

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

      +Manohar Sripada You're very welcome :) I say "Well Hello Internet"

  • @myeon859
    @myeon859 6 ปีที่แล้ว +7

    Stack starts at 16:16
    java.lang.NullPointerException

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Sorry, but I don't understand all of the changes without seeing the actual code

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    I just used an array because everyone understands arrays. I'll provide more examples as the tutorial continues

  • @MexterO123
    @MexterO123 11 ปีที่แล้ว

    Always a pleasure listening to your lectures. Continue the good work bro. : )

  • @mmmmSmegma
    @mmmmSmegma 10 ปีที่แล้ว

    If you leave out the condition for the Queue to be full, Would you then have in the remove method : rear++; then rear = rear % maxNumOfItems. Similarly for insert would you then have front++; then front = front % maxNumOfItems? That way you can keep adding and removing stuff?

  • @kaeiaoemaoe9740
    @kaeiaoemaoe9740 9 ปีที่แล้ว

    First off, let me say, great videos!! I'm refreshing my knowledge in the subjects because I essentially flushed em after my courses to make room for new info lol. I just had a small question... why not move all of the elements up after removing an item in the queue, to maximize space for new inserts?

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

    Thank you so much you saved my finals

    • @derekbanas
      @derekbanas  5 ปีที่แล้ว

      I'm happy I could help :)

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    You're very welcome :)

  • @ashmeetkaur4067
    @ashmeetkaur4067 6 ปีที่แล้ว

    I think in insertPriority, ur for loop must span from rear to front instead, as numberOfItems may get decreased after some elements are deleted.

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

    Perhaps the pop() method should be returning the oldValue prior to setting it to "-1"; hence:
    public String pop(){
    if (topOfStack >= 0) {
    // display and print e.t.c
    String value = stackArray[topOfStack];
    stackArray[topOfStack--] = "-1";
    return value;
    }
    //else print and report stack is empty e.t.c
    }
    ** I didn't check all the comments below to see whether anyone mentioned this **

    • @BlackGhost13Kh
      @BlackGhost13Kh 5 ปีที่แล้ว

      I also thought the same thing.
      public String pop() {
      String rep="";
      if(topOfStack>=0) {
      display();
      System.out.print("
      POP: The value at the top of the Stack "+stackArray[topOfStack]+" was removed from the Stack");
      rep=stackArray[topOfStack];
      stackArray[topOfStack]="-1";
      topOfStack--;
      }
      else {
      System.out.print("POP: the Stack is empty apparently. Unable to pop any Value.");
      }



      return rep;
      }

  • @Cezkarma
    @Cezkarma 8 ปีที่แล้ว +37

    dude you are awesome

    • @derekbanas
      @derekbanas  8 ปีที่แล้ว +6

      Thank you for the compliment :)

    • @vericlese
      @vericlese 7 ปีที่แล้ว

      J-Walker Official Truth!

  • @TheHTMLCode
    @TheHTMLCode 11 ปีที่แล้ว

    is there anything you don't do teach!
    great revision guide, thanks Derek.

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

    but what if we added elements ,and then we removed them like that from the queue " front++; numberOfItems-- ; " , and then we added elements with the size of the array is reached by front ,even thought the condition of insertion still true ; here the numbers of elements is less than the size "if(numberOfItems + 1

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

      it would be better if we do that right ?
      for(int i=0;i

  • @trappedcat3615
    @trappedcat3615 7 ปีที่แล้ว

    Sat in 1+ hour lecture on stacks at college. Came here to actually learn it and in 15 minutes.

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      I'm happy I could help :)

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

    Thank you :) Basically I have everything in playlists. This is the order I would teach : Java Video Tutorial, Design patterns, UML, Object Oriented Design, Code Refactoring, Algorithms. I have everything in order on this page : newthinktank. com/2011/10/every-article/#java

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

    Your are awesome teacher, Thank You.

    • @derekbanas
      @derekbanas  7 ปีที่แล้ว

      Thank you very much :)

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Yes I have linked lists tutorials in the algorithm tutorial on my TH-cam channel

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

    Forgive my ignorance as I am very new but in your pop method, the stack is displayed prior to the -1 assignment. This causes the display to show the value removed. I moved the under the "-1" assignment, just above the return and now it displays the stack without the popped value. Am I correct in doing this or is there something I missed. Again, you rule!
    New version:
    public String pop(){
    if(topOfStack >= 0){
    System.out.println("POP " + stackArray[topOfStack] + " Was Removed From the Stack
    ");
    // Just like in memory an item isn't deleted, but instead is just not available
    stackArray[topOfStack] = "-1"; // Assigns -1 so the value won't appear
    displayTheStack();
    return stackArray[topOfStack--];
    }

  • @kaichengyan4387
    @kaichengyan4387 7 ปีที่แล้ว

    Thanks for your video, but I have a problem about pop() in stacks. When I pop the item from stacks, It still in stacks? But I think pop means remove the item and return it. Not only "not available or not be seen"

  • @123japanuser
    @123japanuser 11 ปีที่แล้ว

    Hola entrenador,
    Gracias por este video muy conceptual.
    Es una base.
    También se alegrarán de saber que tengo en el cuadro de medallas.
    Silver para mí!!
    Ahora sé que el vídeo en tiempo es 11 pm EST :)

  • @agungsurya7070
    @agungsurya7070 10 ปีที่แล้ว

    thank you sir, i really glad to watch your tutorials :)

  • @doctor1221a
    @doctor1221a 7 ปีที่แล้ว

    Derek, I believe that there is a bug with the insert method in TheQueue class. I was testing the class, and I'm getting an ArrayIndexOutOFBounds exception at the boundary condition when the underlying array has been "used up" . To fix, I replaced the insert method logic with .... if (numberofItems +1

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

    Derek,
    'priorityInsert()' methods has a serious bug. Quick check, remove an item and call this method. Reason is, for-loop condition in this method is wrong.

    • @mindtrackeryun24
      @mindtrackeryun24 9 ปีที่แล้ว

      +Ethashamuddin Mohammed yeah, need to check if queue is full. otherwise queueArray[i + 1] doesnt exist

  • @yasserhisham8778
    @yasserhisham8778 11 ปีที่แล้ว

    Thanks. Great tutorial. But shouldn't you wrap the rear and the front to the beginning of the array if they are equal to the arraySize? I mean just increasing them will cause a null pointer exception at some point.

  • @Nikhil-fm4ii
    @Nikhil-fm4ii 7 ปีที่แล้ว +1

    i have one doubt derek bans regarding the insertion operation that inside the insertion operation should we keep the if condition like this if(numberOfItems < queuesize) then we should go further i guess the condition if(numberOfItems +1

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

    Hello sir can you do a stack and queue combined

  • @mmedie
    @mmedie 11 ปีที่แล้ว

    Hi Derek thanks a lot of your videos. The insert method you use in the queue class is it the same as enqueue() which adds new items to the end of the queue. thanks in advance

  • @josephkremer1797
    @josephkremer1797 10 ปีที่แล้ว

    Really great videos, I've learned so much so quickly!!! :)

    • @derekbanas
      @derekbanas  10 ปีที่แล้ว

      Joseph Kremer Thank you very much :)

  • @kamilbolka
    @kamilbolka 7 ปีที่แล้ว

    Hey just a quick question: I thought we aren't supposed to move the first pointer when deleting, instead shift all elements once to the left. And I know in order to do that, the time-consumption is O(n^2), but wouldn't you have more problems in the future when your wasting space at the front? When do you recover the space?

  • @derekbanas
    @derekbanas  11 ปีที่แล้ว

    Thank you :)

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

    WELLHELLODEREK! Thank you for the video from 2019!

    • @derekbanas
      @derekbanas  5 ปีที่แล้ว

      Well Hello :) I'm happy to be of help

  • @aminebz100
    @aminebz100 9 ปีที่แล้ว

    This may be a stupid question but: In your pop method you set stackArray[topOfStack] = "-1" then return stackArray[topOfStack--] wouldn't that just return -1, not the value that was removed?

  • @ediIlaura
    @ediIlaura 10 ปีที่แล้ว

    When you design the queue using the array. The from and rear doesn't rotate which does not make sense. This queue doesn't work well I think

  • @alexanderfedorenko3398
    @alexanderfedorenko3398 8 ปีที่แล้ว

    Great explanation! Thank you!

  • @duhbruno
    @duhbruno 7 ปีที่แล้ว

    Really nice content dude... keep doing the great job!
    Btw, nice reference to the Stephen King's master piece on the code... It was "shining" !

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

      Thank you very much :) You got it

  • @sbasalan
    @sbasalan 11 ปีที่แล้ว

    Hi Derek, greetings from İstanbul city. My training will be finished on next Tuesday then I'll fly to Jakarta and start to work there. Hope you're doing alright

  • @m.koncicky7031
    @m.koncicky7031 5 ปีที่แล้ว

    How did you create the console output on the right with the values in the stack? He would be good at teaching. Can you help me in this?
    Great job!

  • @ALLCAPS
    @ALLCAPS 6 ปีที่แล้ว

    I actually have a question! Say I want to remove an item from the queue and I do. I wanted my front to stay at index 0, and every other value to shift down... :/

  • @putin_navsegda6487
    @putin_navsegda6487 7 ปีที่แล้ว

    I don't understand why in Queue remove you make front++ (line 51 12:22)? Logically we should decrease front by one, no?