This course has been updated into a 4 part series! We now recommend you take the A Practical Guide to Algorithms with JavaScript course.

Check out a free preview of the full Data Structures and Algorithms in JavaScript course:
The "Exercise: Creating Stacks and Queues" Lesson is part of the full, Data Structures and Algorithms in JavaScript course featured in this preview video. Here's what you'd learn in this lesson:

In this exercise, you will implement both the Stack and Queue data structures. Each data structure is stubbed out and commented with the instructions for what you need to complete.

Get Unlimited Access Now

Transcript from the "Exercise: Creating Stacks and Queues" Lesson

[00:00:00]
>> Bianca Gandolfo: We're just gonna jump into exercises. The first thing is, if you did not finish your string exercise, I encourage you to finish that. Second thing is, where are the exercises? Let me tell you, they are not there, they are here, thank you, reload, and let me just make sure that this link even works.

[00:00:25]
>> Bianca Gandolfo: Nope, that's not even the right one. We need to go to this one.
>> Bianca Gandolfo: Here we are, we are here. All right, so we click on this link, ooh, it's working. Look at that. So here are the links to your exercises. We're gonna do 1 and 2.

[00:00:52] Yeah, 3 and 4 are gonna be for later this afternoon. So there is some notes here on the bottom. There's some exercises bundled with these data structures that you might not be able to complete until further study. So that just know, I have note on which ones are gonna be unreasonable if you don't know the specific algorithm.

[00:01:12] But everything else should be good to go, yeah. So you're gonna implement these data structures, not using an array, but also not using a string, okay, because we don't really use a string now. It's just a thought exercise.
>> Bianca Gandolfo: Cool? So any ideas of what we might use if we can't use a string, and we can't use an array?

[00:01:37]
>> Speaker 2: An object?
>> Bianca Gandolfo: Bingo, an object. That's my only clue, all right? This is harking back to my Scooby Doo mystery board game, that's my clue for you.
>> Speaker 3: I'm [INAUDIBLE].
>> Bianca Gandolfo: All right. You have a question?
>> Speaker 3: Can you repeats that last.
>> Bianca Gandolfo: The clue is, instead of using a string, use an object.

[00:02:02] You cannot use an array. Yeah.