Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8486133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:51:28+00:00 2026-06-10T20:51:28+00:00

Many times, stack is implemented as a linked list, Is array representation not good

  • 0

Many times, stack is implemented as a linked list, Is array representation not good enough, in array we can perform push pop easily, and linked list over array complicates the code, and has no advantage over array implementation.

Can you give any example where a linked list implementation is more beneficial, or we cant do without it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:51:30+00:00Added an answer on June 10, 2026 at 8:51 pm

    I would say that many practical implementations of stacks are written using arrays. For example, the .NET Stack implementation uses an array as a backing store.

    Arrays are typically more efficient because you can keep the stack nodes all nearby in contiguous memory that can fit nicely in your fast cache lines on the processor.

    I imagine you see textbook implementations of stacks that use linked lists because they’re easier to write and don’t force you to write a little bit of extra code to manage the backing array store as well as come up with a growth/copy/reserve space heuristic.

    In addition, if you’re really pressed to use little memory, a linked list implementation might make sense since you don’t “waste” space that’s not currently used. However, on modern processors with plenty of memory, it’s typically better to use arrays to gain the cache advantages they offer rather than worry about page faults with the linked list approach.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have heard it many times that garbage collection in PyS60 is not up
This has been posted many times on Stack Overflow, but none of the answers
Is the JavaScript code that Stack Overflow uses to display how many characters you can
Many times I get quick page design inputs from business/clients which will be finally
Many times I needed a set of pointers. Every time that happens, I end
Many times I use 'mqsc' for create MQ queue manager from script files but
Many times I work with optimized code (sometimes even involving vectorized loops), which contain
Many times when I lose connection to my development server, I just log back
Many times I see statements like following Y.CustomApp.superclass.render.apply(this, arguments); I know how apply works.
Many times i run time consuming PHP scripts that echo status updates like 'batch

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.