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.

Did you find this post useful? Show some love!

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.

Wonderful episode. Welcome back Vaidehi!


Hey there, we see you aren't signed in. (Yes you, the reader. This is a fake comment.)

Please consider creating an account on It literally takes a few seconds and we'd appreciate the support so much. ❀️

Plus, no fake comments when you're signed in. πŸ™ƒ

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

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

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!

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

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.

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

class Stack {
    constructor() {
        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 :)

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

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

Classic DEV Post from Feb 12

Docker Guide - Part 1

An overview of Docker technology

Follow @drminnaar to see more of their posts in your feed.
Vaidehi Joshi
Writing words, writing code. Sometimes doing both at once.
More from @vaidehijoshi
Hash Tables β€” BaseCS Video Series
#computerscience #basecs
Graph Theory β€” BaseCS Video Series
#computerscience #basecs
Trending on
How can you swap two variables without using a third?
#challenge #computerscience #interview #memory
How do you think of angularjs application
Stacks n Queues
#webdev #career #computerscience #beginners
How to Improve Your Development Experience
#beginners #career #development #productivity
Implementing the Stack Data Structure in Javascript
#javascript #computerscience #datastructures #programming
Juggling Multiple Languages Simultaneously
Writing Beautiful Code
#webdev #productivity #php
If you don't hire juniors, you don't deserve seniors
#career #management #recruiting