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
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.
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.
1. Describe a Computer Operations internal control that you would implement to give you comfort that...
1. Describe a Computer Operations internal control that you would implement to give you comfort that each of the following objectives is being met: Controls provide reasonable assurance that data recorded, processed and reported remain complete, accurate and valid throughout the update and storage process. Controls provide reasonable assurance that authorized programs are executed as planned and deviations from scheduled processing are identified and investigated, including controls over job scheduling, processing, error monitoring and system availability. Controls provide reasonable assurance...
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT