Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 172693

A LIFO (Last In, First Out) data structure.

1 vote

Big-Oh notation of a stackarray

The stack is using an array as the underlying storage. The methods push, pop and peek are performing a single indexed access to the underlying array. … This means you have a very efficient stack. But the obvious problem is the size is limited to maxSize. When the stack grows larger than this, it will just crash. …
JacquesB's user avatar
  • 61k
5 votes

Why is call stack not implemented as a dynamic array in modern OS?

Programs compiled to machine code with todays compilers assume the stack is contiguous (and does not move around during execution), so this would break backwards compatibility with almost all existing …
JacquesB's user avatar
  • 61k
76 votes
Accepted

Why do programs use call stacks, if nested function calls can be inlined?

This is called "inlining" and many compilers do this as an optimization strategy in cases where it makes sense. In your particular example, this optimization would save both space and execution time …
JacquesB's user avatar
  • 61k