Top "Stack" questions

A stack is a last in, first out (LIFO) abstract data type and data structure.

Which is faster: Stack allocation or Heap allocation

This question may sound fairly elementary, but this is a debate I had with another developer I work with. I …

c++ performance memory stack heap
What is a stack pointer used for in microprocessors?

I am preparing for a microprocessor exam. If the use of a program counter is to hold the address of …

stack microprocessors
How does the stack work in assembly language?

I'm currently trying to understand how the stack works, so I've decided teach myself some assembly language, I'm using this …

assembly stack callstack
What does "ulimit -s unlimited" do?

There are understandably many related questions on stack allocation What and where are the stack and heap? Why is there …

linux stack ulimit
design a stack such that getMinimum( ) should be O(1)

This is one of an interview question. You need to design a stack which holds an integer value such that …

algorithm language-agnostic data-structures stack
Android: Clear Activity Stack

I'm having several activities in my application. and flow is very complicated. When I click the Logout application navigates to …

android android-activity stack
What is the default stack size, can it grow, how does it work with garbage collection?

I understand that each thread has its own stack. Primitive types and references are kept on the stack, and that …

java memory stack
Object creation on the stack/heap?

The following code creates an object on the stack: Object o; When creating an object on the heap we can …

c++ initialization stack heap
When vectors are allocated, do they use memory on the heap or the stack?

Are all of the following statements true? vector<Type> vect; //allocates vect on stack and each of the …

c++ stl vector stack heap
Java Collections (LIFO Structure)

I am looking in the Collections framework of Java for a LIFO Structure (Stack) without any success. Basically I want …

java collections stack queue