Question

Linked lists certainly offer some additional flexiblity over arrays. What might be a good example of...

Linked lists certainly offer some additional flexiblity over arrays. What might be a good example of an application that would use them appropriately? Typed preference.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer)
The linked list is a linear data structure where the elements which are stored in separate objects and the elements are not stored in a contiguous location and the elements are linked using the pointers. The linked list nodes are much up of data and reference node. The arrays are the data structures which can hold a fixed number of the values in a single data type which is pre-defined.
Linked lists offer much additional flexibility over the array data structures.
For example:
The size of the arrays are fixed and pre-defined and the upper limit on the array is defined in advanced and thus the allocated memory is equal to the upper limit of the array and the upper limit is not usually reached. Thus the array uses space and memory whereas linked lists are dynamic and elements are added and linked list expands as they are needed and are not pre-defined.
For inserting and deleting in a particular position, it is a problem for the array list while we need to just insert and link the elements in the linked lists. Such as when we maintain a sorted list of number in an array, we need to shift the elements to maintain the sorted list we need to move the elements for maintaining the order. But in a linked list, we just need to get to the position and insert the elements in the middle of the sorted order to maintain the sorted order.
Thus linked list has the advantages of dynamic size and also ease in the insertion and deletion of the elements.

Add a comment
Know the answer?
Add Answer to:
Linked lists certainly offer some additional flexiblity over arrays. What might be a good example of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • you have learned about linked lists and about the Java Collection Interface. What is a linked...

    you have learned about linked lists and about the Java Collection Interface. What is a linked list? Why might we use them? What is the purpose of the Java Collection Interface? Your initial post should be at least 200 to 300 words.

  • What might be some “good” practices for delivering messages orally as compared to delivering them in...

    What might be some “good” practices for delivering messages orally as compared to delivering them in a written format?  

  • What do you think the future of genetic research might involve? what would be your preference...

    What do you think the future of genetic research might involve? what would be your preference for future genetic research? identify and analyze some of Resnick's positions for example, ( what are they, and do you agree with them ? why or why not?

  • Description Create a polynomial class with linked lists and implement some basic functions. Specifications Polynomials are...

    Description Create a polynomial class with linked lists and implement some basic functions. Specifications Polynomials are stored in a linked list of Term objects (two classes: Polynomial and Term). Term objects have two data fields: coefficient and exponent, both positive integers. Polynomial will have some methods that create linked list functionality, but not all list operations are needed; include only those used by this program. Do not use a separate linked list class. The list will be non-circular. Make a...

  • need help with dice excercise For example, if we were writing a calendar program of some...

    need help with dice excercise For example, if we were writing a calendar program of some sort, we might very well use an array with 366 spots to hold the days, not worrying about adding more days to the year. Exercise 23 (C level] For another example, suppose we want to simulate rolling two six-sided dice repeatedly, tallying how many times each total is rolled. We need a memory cell to count the number of times each of the possible...

  • Creating linked list data structure Overview The purpose of this assignment is for you to write...

    Creating linked list data structure Overview The purpose of this assignment is for you to write a data structure called a Linked List, which utilizes templates (similar to Java’s generics), in order to store any type of data. In addition, the nature of a Linked List will give you some experience dealing with non-contiguous memory organization. This will also give you more experience using pointers and memory management. Pointers, memory allocation, and understand how data is stored in memory will...

  • This C++ Programs should be written in Visual studio 2017 PROGRAM 1: Comparing Using Arrays to...

    This C++ Programs should be written in Visual studio 2017 PROGRAM 1: Comparing Using Arrays to Using Individual Variables One of the main advantages of using arrays instead of individual variables to store values is that the program code becomes much smaller. Write two versions of a program, one using arrays to hold the input values, and one using individual variables to hold the input values. The programs should ask the user to enter 10 integer values, and then it...

  • This project is meant to give you experience writing linked lists and graphs. As such, you...

    This project is meant to give you experience writing linked lists and graphs. As such, you are not permitted to use arrays or any data structure library. You may, however, make use of code presented in class and posted to Blackboard. Objective Your goal for this project is to take a block of text, analyze it, and produce random sentences in the style of the original text. For example, your program, given Wizard of Oz, might produce: how quite lion...

  • You will consider how to pay for a $2,000 consumer good and/or service someone might need...

    You will consider how to pay for a $2,000 consumer good and/or service someone might need to purchase in an emergency, such as a major repair to a car or home. You will analyze two loans for paying for the good and/or service. The first is for someone who has enough money set aside to cover some of the upfront costs (e.g. a down payment) and the second is for someone who does not. Additionally, the second person has less...

  • When answering this question, can you please specify what you name your files? Thank you! Write a...

    When answering this question, can you please specify what you name your files? Thank you! Write a Java application, and an additional class to represent some real-world entity. Keep in mind that a class is a model in code of something real or imagined, which has attributes (member variables) and behaviors (member methods). The class will: a. Create a total of 5 member variables for the class, selecting the appropriate data types for each field. For example, a class to...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT