Question

In: Computer Science

You would like to implement a list where you put in operations at any position to...

You would like to implement a list where you put in operations at any position to the list occur frequently. Would you use an array-based list? Explain why or why not?

Solutions

Expert Solution

Yes it would be good to implement a list where you put in the operations at any position to the list occuring frequently. For example in Java programming platform it contains two general-purpose List implementations. ArrayList, which is generally the better-performing implementation, and LinkedList which offers better performance under certain circumstances.

Both Arrays and Linked List can be used to store linear data of similar types, but they both have some advantages and disadvantages over each other.

We would use Array based list because of the factors stated below :-

1. An array is the data structure that contains a collection of similar type data elements whereas the Linked list is considered as a non-primitive data structure contains a collection of unordered linked elements known as nodes.

2.Accessing an element in an array is fast, while Linked list takes linear time, so it is quite a bit slower.

3.Elements are stored consecutively in arrays whereas it is stored randomly in Linked lists.

4.The requirement of memory is less due to actual data being stored within the index in the array. As against, there is a need for more memory in Linked Lists due to storage of additional next and previous referencing elements.


Related Solutions

select any company that you would like to work for and b) decide the position you...
select any company that you would like to work for and b) decide the position you want to apply for (salesperson, in marketing, trainee, Intern, etc.), then prepare: c) A post interview email.
To be considered for a position with the Operations Section: Give examples of where you have...
To be considered for a position with the Operations Section: Give examples of where you have either researched, developed or performed a cost benefit analysis. What was the information used for, and how did it guide the decision making process?
Imagine you are the CEO of a health care organization. You would like to implement a...
Imagine you are the CEO of a health care organization. You would like to implement a patient-centric health information management system (HIMS) within the organization. This system needs to take into consideration health care costs and safety. You need your executive team on board to ensure the successful implementation of this patient-centric health care technology information system. You plan to present a detailed report to your management team about the patient-centric approach, its benefits and challenges, and why your organization...
You are at a company where you would like to get hired. How would you engage...
You are at a company where you would like to get hired. How would you engage in authentic self-presentation or strategic self-presentation in this context (explain both types of self presentation)
A local restaurant would like to put its business online, and you are in charge of...
A local restaurant would like to put its business online, and you are in charge of this project. Discuss how you should you approach developing the scope of this Web-based project. Share how your personal experiences with online business interfaces can influence how you approach this project
Consider the opportunity of applying for a position with a new organization. What would you like...
Consider the opportunity of applying for a position with a new organization. What would you like the employer to know about you? How does your Strengths Test accent your potential within that organization?   Please clarify your response through examples.
Assume that you want to implement binary search with a linked list. What would be the...
Assume that you want to implement binary search with a linked list. What would be the performance of this algorithm? Compare and contrast this algorithm with the implementation of binary search on traditional sorted array and give a discussion. Your discussion and analysis must explain what the possibilities, issues and consequences of such design are, and then explain whether these issues would exist in the traditional array approach. Your answer can be around 1-2 paragraph of writing backed-up with algorithmic...
Describe your process of selecting the current trend or solution that you would like to implement...
Describe your process of selecting the current trend or solution that you would like to implement within your organization. Share at least 3 of the most useful resources that you have found for identifying current trends in the health care management industry. Identify at least 2 resources that you reviewed but chose not to use. Indicate how you decided what was a good resource and what was not. Use a narrative format in your posts, not bullet points. PLEASE USE...
Write a program where you- 1. Create a class to implement "Double Linked List" of integers....
Write a program where you- 1. Create a class to implement "Double Linked List" of integers. (10) 2. Create the list and print the list in forward and reverse directions. (10)
As a Biomedical Engineer, you are working on a biomechanical project where you would like to...
As a Biomedical Engineer, you are working on a biomechanical project where you would like to design a mechanical robot to simulate human gait in positions of walking and running. Putting in considerations to record important gait parameters for this purpose, suggest 2 possible tools or systems required for gait measurement and justify how the suggested tools or systems can help you achieve your goal.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT