Differentiate stack from array?



Differentiate stack from array?..

Answer / Priyanka Suman

An Array is a data structure that stores elements at contiguous memory locations, accessible by their indices. A Stack is a specific type of linear data structure where elements are added and removed only from the top, following a Last-In-First-Out (LIFO) principle. Unlike arrays, stacks have limited functionality but allow for efficient handling of function call and return mechanics.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Where is insertion sort used?

1 Answers  


Can we extend an array after initialization?

1 Answers  


What is circular queue in data structure?

1 Answers  


What are the advantages of sorting?

1 Answers  


How do you sort an array by value?

1 Answers  


Which process places data at the back of the queue?

1 Answers  


Does treemap allow null key?

1 Answers  


Does hashmap allow null keys?

1 Answers  


Can we store a string and integer together in an array?

1 Answers  


What do you mean by priority queue?

1 Answers  


Which file contains the definition of member functions?

1 Answers  


Define the queue data structure.

1 Answers  


Categories