answersLogoWhite

0


Best Answer

Linked memory because its very useful primarily when the lists to be sorted are very large and the size of data to be moved is small.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Which is preferred for writing a Merge Sort routine contiguous or linked memory?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Differences linked-list non contiguous allocation and linked-list allocation using index?

ok


What is the difference between array linklist?

Linked list consists of data nodes each pointing to next in the list .An array consist of contiguous chunk memory of predetermined size


What are the advantages and disadvantages of the linked implementation of a queue relative to the contiguous implementation?

Contiguous implementation (e.g., using an array), has a major disadvantage in that you have to allocate enough space in the array to hold all the elements in the queue. When there is insufficient space, you have to re-allocate, which may occasionally require the entire array be copied to new memory. In addition, with each extraction, you are left with unused memory at the start of the array. Thus before any re-allocation, you must first check if there are unused elements and then shunt all elements forward, thus creating space at the end of the array. If we ignore the shunting and re-allocations necessary with an array, insertions and extractions will occur in constant time for both contiguous and linked implementations. However, once you take shunting and re-allocation into account, we find that contiguous implementations occasionally falter during an insertion. Contiguous implementations also require more memory than linked implementations. Although a linked node is larger than an array element by one pointer (32 bits on a 32-bit system), contiguous implementations must allocate far more memory than is actually required in order to minimise the number of re-allocations. Thus an array must always have unused elements. Moreover, when all elements are extracted from the queue, the current allocation remains in memory. With linked implementations, the only memory allocated is the memory actually in use at any given moment, with the minimum memory requirement being just one pointer, to the tail node. An optimal queue implementation will use a circular linked list, where only the tail node need be maintained by the list object. The tail's next node always points to the head node, so there is no need to maintain this separately. The only real disadvantage of a linked implementation is the need to allocate and deallocate memory for each insertion and extraction respectively. However, this is a constant time operation. With contiguous implementation, only extraction is guaranteed to be a constant time operation. Most of the time, insertions will be constant time, but will occasionally take variable time due to the need to shunt or re-allocate.


What is the c plus plus code for application of linked list in mobile phones?

If people started writing these codes here, then what software engineers will do?


What are the advantages of linked list over arrays?

# Linked lists do not need contiguous blocks of memory; extremely large data sets stored in an array might not be able to fit in memory. # Linked list storage does not need to be preallocated (again, due to arrays needing contiguous memory blocks). # Inserting or removing an element into a linked list requires one data update, inserting or removing an element into an array requires n (all elements after the modified index need to be shifted).

Related questions

Differences linked-list non contiguous allocation and linked-list allocation using index?

ok


File allocation methods in operating system?

Contiguous Allocation Linked Allocation Indexed Allocation


Which of the following is the best definition of a tree within Active Directory?

A: A group of hierarchically linked domains with trust relationships between them. B: A group of hierarchically linked domains within the same site. C: A group of hierarchically linked domains that have a contiguous namespace. D: A group of hierarchically linked domains within a forest. A A group of hierarchically linked domains with trust relationships between them. B A group of hierarchically linked domains within the same site. C A group of hierarchically linked domains that have a contiguous namespace. D A group of hierarchically linked domains within a forest.


Is tuberculosis countigous?

If you are asking if TB (tuberculosis) is contagious, the answer is yes. If you are asking if TB is contiguous, the answer is when it is a synthetic viral epitope and is contiguously linked.


What organization of concepts is a routine of linked actions or behaviors that serve a particular purpose?

script (A+)


How is scribe and hieroglyph linked together?

because they are writing and writers


Can you simulate linked list using arrays?

I would say no, but it really depends on your point of view. An array and a linked list can both hold the same data; the only difference is how they do so. The definition of a linked list is a sequence of connected nodes. An array is a contiguous block of memory, so you can think of an array as a linked list in which each element is spacially connected to the next.


Why linked list reprsentation is preferred?

In memory it is always required to use memory space properly.In linked list representation it is easier & searching for data is also quicker than linear array.


What is the difference between array linklist?

Linked list consists of data nodes each pointing to next in the list .An array consist of contiguous chunk memory of predetermined size


Can you critique my writing?

WikiAnswers is not really a writing critique site. I have linked some good writing critique sites for you below - also, some Related Questions about how to edit and critique your own work!


How can I stop Google from returning only pages in Esperanto when I search?

look at the "preferences" page that is linked next to the search box. You can choose your preferred languages there.


Why is glucose linked to health issues?

Glucose is the simplest form of sugar and the preferred energy source of the body. Since it is necessary for every cell to have in order for it to live, it becomes easy to realize that many health issues can be linked to how the body uses it.