Understanding Stacks

I like programming (at work) and learning for fun. You'll often find me cooking and working on my house in my spare time.
Search for a command to run...

I like programming (at work) and learning for fun. You'll often find me cooking and working on my house in my spare time.
No comments yet. Be the first to comment.
I have a credit card that offers cash back on purchases. Credit cards provide a time buffer between when a charge is incurred and when funds leave the checking account paying it off. This helps avoid

I want to get into the Kotlin community to accelerate my learning. Where should I go? Well, this was handy, https://kotlinlang.org/community/. I went through each of these resources. Unless stated oth

We're switching from Clojure to Kotlin at work. Is that good? I don't know yet! Here are some things I love about Clojure: its incredible REPL EDN keywords maps with heterogeneous keys and values

I've been using Arc Browser for a long time. Why? Because I love vertical tabs in my browser. They allow me to read more of each tab's title when I have a lot of tabs. What Are Vertical Tabs? Tabs are

Imagine rows of letters, numbers, and Greek letters: [[:a :b] [:1 :2] [:alpha :beta]] Now, you want to transpose them. You started with a vector of vectors. Clojure's map function is pretty amazing

In computer science, a stack is what you think it is. A pile. There are two important restrictions:
Only add to the top
Only remove from the top
To illustrate, let’s track how we get dressed using a stack. At first, the stack is empty. Let’s add a shirt, a sweater, and a coat. Our stack now looks like this:
Now, we want to go swimming. In real life, and in a stack, we can’t remove the shirt first since the sweater and coat are in the way. The stack we built tells us the order in which to remove the clothes: coat, sweater, shirt.
The only thing we can access is the last thing we put in. Therefore, we say that a stack is last-in, first-out (LIFO). We could also call it first-in, last-out (FILO), but nobody says that.
You can read more at https://www.geeksforgeeks.org/dsa/applications-advantages-and-disadvantages-of-stack/.