DEV Community

Play Button Pause Button
Vaidehi Joshi
Vaidehi Joshi

Posted on

Stacks and Queues β€” BaseCS Video Series

"Stack level too deep!"

Stacks and queues are all around us. In this video we break down what they are, how they work, and their place in every day software development.

For more on Stacks and queues, check out this post:

If you have questions or comments, please feel free to share below.

SparkPost Logo

This video series is sponsored by SparkPost. There's never been a better way for developers to send email.

Top comments (17)

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026
 
jinhuiwong profile image
Wong

Wonderful!

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026
 
nelsonrodrigues profile image
Nelson Rodrigues

Loving this series! I'm a visual learner so this style is just perfect for me!

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026
 
philsinsight profile image
Mr. Boateng

Great video, really appreciated the illustrations πŸ‘ŒπŸΎ

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026
 
codemouse92 profile image
Jason C. McDonald

Really great videos! Even though I'm well familiar with these concepts, it was a good reminder, and I have half a page of notes for expanding and improving my company's high-efficiency implementations.

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026
 
nickytonline profile image
Nick Taylor

I took CS in university, but I'm really enjoying this series. It's so well done. I love your drawings. They really help the concepts sink in for viewers. Looking forward to the next one. Keep up the great work Vaidehi!

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026
 
ben profile image
Ben Halpern

Wonderful episode. Welcome back Vaidehi!

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026
 
andy profile image
Andy Zhao (he/him)

Awesome video!

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026
 
samsonasik profile image
Abdul Malik Ikhsan

Awesome, Thank you!

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026
 
brwerme profile image
RHRup

Thanks πŸ™ vaidehi joshi ...really appreciating for helping to learn and giving confident on understanding i can do itπŸ‘©πŸ»β€πŸŽ“β˜ΊοΈ

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026
 
nonsobiose profile image
Nonso Biose

Hey, when you say an Array is a static Data Structure, I understand, coz in Java an array is created with an initial size. But in javaScript, arrays are dynamic. So can't see implement a stack using arrays in JavaScript.

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026
 
namirsab profile image
Namir

You can easily do it with arrays. A small example:

class Stack {
    constructor() {
        this.stack = [];
    }
    push(element) {
        this.stack.push(element);
    }
    top() {
        return this.stack[this.stack.length - 1];
    }

    pop() {
        return this.stack.pop();
    }

    toArray() {
        return Array.from(this.stack);
    }

    isEmpty() {
        return this.stack.length === 0;
    }
}

You could tune it a bit to check for a maximum size or stuff like that :)

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026
 
nonsobiose profile image
Nonso Biose

Thanks. But in this way, the stack can never get filled up, coz the array ain't static. I think different languages, have their different implementation of abstract structures. In java, you can't implement a stack with an array coz its fixed

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026 Thread
 
namirsab profile image
Namir

You can always "fix" the array if you want by adding a size to the constructor. Then you check if the size is met whenever you push a new value to the stack. So yeah, the language can give you other constructs and other ways to do something, but it's totally possible to do it in JavaScript

πŸ”₯ Jadwal & Hasil: vaidehijoshi/stacks and queues basecs video series oj - Info Live Streaming 2026 Thread
 
nonsobiose profile image
Nonso Biose

Thanks man