Questions tagged [stack]

A stack is an abstract data type and structure that operates on a last in, first out (LIFO) basis. If you have inquiries regarding the assembly call stack, consider utilizing [stack-memory], [stack-pointer], and/or [stack-frame]. For queries related to the Haskell build tool, opt for [haskell-stack]. And when it comes to questions about C++ std::stack, choose [stdstack] as your tag.

Modifying a single element within a class with Jquery

Is it possible to create a stack of pages on a website using JQuery? I found this image that shows what I'm trying to achieve: image. Instead of applying ID css for each page, I'd like to use JQuery. While researching similar questions, I came across the ...

For some odd reason, my stack is missing the "top" attribute

import random value = { "Two":2,"Three":3, "Four":4, "Five":5, "Six":6, "Seven":7, "Eight":8, "Nine":9, "Ten":10, "Jack":10, "Queen&qu ...

Unable to bounce back from a stack overload

While learning Python, I created a small script that seems to run into a stack overflow error when the server disconnects. Here is my script: #/user/bin/python import os import socket import subprocess import errno import threading s = socket.socket() ...

matching parentheses in python with stack algorithm

I'm working on implementing a stack to validate parenthesis, but I'm having trouble getting the correct output with the code below. Despite reviewing it multiple times, I can't seem to identify the mistakes. Any suggestions or assistance would be greatly ...

Attempting to add an element to the top or bottom of my stack

My goal is to add 'FRONT: ' and ' :BACK' to the end of my string (self._data) but the output I'm getting is: 'FRONT: [10, 8, 7, 5] [10, 8, 7, 5] [10, 8, 7, 5] [10, 8, 7, 5] :BACK' What I really want is for it to display ...