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
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!
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)
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!!
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.
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!
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.
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
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.
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.
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!
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!
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
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.
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.
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
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.
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
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!
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 :)
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?
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!!!!
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().
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
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 :)
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 **
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."); }
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 :)
Write a complete Java program that provides a method named isPalindrome, which takes a Queue of integers as a parameter and returns true if the numbers in the Queue represent a palindrome (and false otherwise). The empty Queue should be considered a palindrome. You may use one Stack as auxiliary storage.
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
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?
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
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.
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.
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?
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--]; }
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
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
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
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!
Thank you :) I'm very happy I can help to explain what your teachers missed
Jeramy smith can we chat private?
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!
Thank you very much for the kind message :) People like you are the reason why I continue making videos.
I second what he said.
I've been using you through the whole semester, almost every single day.
Nick Steiner Thank you :) That is very nice to hear that I helped.
Thank you for the marvelous work, Derek. Your style, speed and code accuracy is just amazing.
+abdalla elmedani Thank you for the compliment :) You're very welcome
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)
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!!
Thank you :) Keep at it. The world needs plenty of programmers. You'll find the job you're looking for.
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.
Thank you for taking the time to write such a nice message :) I greatly appreciate it !!!
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!
MAGonzzManifesto Thank you for all the nice compliments :) Many more videos are coming.
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!
Thank you for the nice compliment :) I'm very happy that I helped
Queues starts at 9:06
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.
You are better than all of my C.S professors at college. Thanks man for these tutorials. You made this seem so much easier.
+Ankur Lohiya Thank you for the nice compliment :) You're very welcome
Thank you :) many more are coming as quickly as possible
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
Thank you very much for the compliments :) There is no money required. I'm happy I could help. May God bless you as well.
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.
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 :)
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.
Thank you :) I do my best to present the information in new ways. I'm glad they are helping.
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.
Thank you :) As the tutorial continues I use them for sorting and other things. I hope they help
Thank you for putting up these tutorials. You deserve to be commended for this.
You're very welcome :) The pleasure is all mine. I have met many wonderful people all over the world from doing this.
Love your Coding Skills Sir,
Especially the Easy Variables you use Solve half the Problem and the display methods just LOVE !
hotmandead1 Thank you :) I'm glad you enjoy them
You're very welcome :) I'm glad you enjoyed the video
One night to finish my lab. YOU made it possible! Thank you so much! :)
Kalle Great I'm glad I could help :)
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!
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.
Thanks for helping others :)
Derek Banas and thank you for helping me through university!
This is just what i needed. It's way more direct than my dry programming book. Subscribing!
Thank you :)
Your presentations are very good and well put together.... You deserve an award for this...
Thank you :) Appreciation is more then enough for me.
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!
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
Very helpful, Derek.
Learned a lot, and I deeply appreciate your contribution to the learning.
Thank you very much :) I'm glad you found it useful.
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.
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.
Lone Star VII Good point :)
Thank you so much Sir for doing all these your are providing best video tutorials in the planet
Thank you very much for the nice compliment :)
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
Thank you so much ! You're an inspiration for new tutors like me🙏
Thank you :) I wish you all the best
@@derekbanas thanks a lot😊
Your programming is amazingly proficient! I like all the algorithms videos.
I wish you the best on your travels. The only traveling I've ever done is in books pretty much :)
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.
I just can't thank you enough for such knowledge packed videos
You're appreciation is all I require. I'm very happy that you enjoy the videos :)
You are awesome Derek. These videos are a boon for interview preparations. 6 hour revision for the basic data structures!!..Thumbs UP..:-)
Thank you for taking the time to put up these tutorials, they are awesome and very appreciated!!
You're very welcome :) I'm glad you like them.
This is sure to help in my Data Structures & Algorithms class. Thanks.
I hope it helps :)
Holy crap, I kind of understand java now! Thank you sir.
I'm happy I could help :)
Thank you :) Everyone is very nice to me and that is all I need.
Yes stacks are very much part of how computers and compilers work on a basic level
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.
What would be a fix to this error then? I’m genuinely curious.
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
Thank you :) I have to cover other common interview questions that I don't cover here and in the design patterns tutorial
Thank you so much for your great videos. You explain everything in such a clear manner. I look forward to watching all your videos.
Thank you very much :) I appreciate the nice message.
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!
rujia hao Thank you for the nice compliment :) You're very welcome
You saved this CS students butt, thanks dude. I'm never procrastinating on my CS projects again. Let me tell you that. : D
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 :)
Thank you for the nice compliment :)
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?
Thank you very much :) I'm happy the videos are helping. Sorry, but I haven't covered discrete mathematics yet
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!!!!
Yes I cover Big O here ua-cam.com/video/V6mKVRU1evU/v-deo.html
Literally an entire semester in Computer Science summarized perfectly in 16 minutes.
I do my best to not waste time :)
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().
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
You are very good at this! You deserve a hug and HUGE pile of money :)
Stack starts at 16:16
java.lang.NullPointerException
I just used an array because everyone understands arrays. I'll provide more examples as the tutorial continues
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 :)
+Manohar Sripada You're very welcome :) I say "Well Hello Internet"
Yes I have linked lists tutorials in the algorithm tutorial on my UA-cam channel
This is extremely helpful, job well done !
+Dean Bartolo Thank you very much :)
Always a pleasure listening to your lectures. Continue the good work bro. : )
I'm very happy that I could help :)
Thank you :) I try to do my best.
is there anything you don't do teach!
great revision guide, thanks Derek.
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 **
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;
}
Thank you so much you saved my finals
I'm happy I could help :)
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 :)
Write a complete Java program that provides a method named isPalindrome, which takes a
Queue of integers as a parameter and returns true if the numbers in the Queue represent a
palindrome (and false otherwise). The empty Queue should be considered a palindrome.
You may use one Stack as auxiliary storage.
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
Sat in 1+ hour lecture on stacks at college. Came here to actually learn it and in 15 minutes.
I'm happy I could help :)
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?
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
makes sense
I kind of like Stacks more then Queues, but I'm still new to them both.
Your are awesome teacher, Thank You.
Thank you very much :)
You're very welcome :)
WELLHELLODEREK! Thank you for the video from 2019!
Well Hello :) I'm happy to be of help
I think in insertPriority, ur for loop must span from rear to front instead, as numberOfItems may get decreased after some elements are deleted.
This implementation is through arrays, i needed the linked list implementation cuz thats the one everyone asks
Great explanation! Thank you!
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.
thank you sir, i really glad to watch your tutorials :)
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.
+Ethashamuddin Mohammed yeah, need to check if queue is full. otherwise queueArray[i + 1] doesnt exist
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" !
Thank you very much :) You got it
The push and pop statements are good for debugging purposes
dude you are awesome
Thank you for the compliment :)
J-Walker Official Truth!
Thank you :)
Good tutorial as always, although I would have been more interested to see this done in a linkedlist fashion.
Actor John Goodman was the instructor of my first foray into Stacks and Queues. How cool is that????
Cryogenics12 That's funny :D
Hey you thanks for the videos they help alot!
You're very welcome :)
thank you sir. great tutorial
I'm very happy that I could help :)
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?
Really great videos, I've learned so much so quickly!!! :)
Joseph Kremer Thank you very much :)
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--];
}
PrioriyQueues follow a min-heap data structure so they don't necessarily end up in ascending or descending order
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
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
Dude !! you rock!!!!! best video period
Thank you very much :)
Why when I type the displaySTack, there is an error. Should I do a other method to display the output?
how did you do that?
It think you need to make your own method for printing out the stack