answersLogoWhite

0

using doublelinked list insertion sort in c language

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do you sort a link list?

You copy the list, while using an insertion sort criteria.


Write a Linked list program for insertion and deletion of a node using structureswitch case and in c language?

for all datastructure ,c,c++ programs just visit codingdatastructure.blogspot.com and found on blog archive..


C language using list?

C is a programming.it is defined by the c language


Can implement circular lists using stack?

No. A stack is a data structure that allows insertion and removal at the top. A circular list allows insertion and removal anywhere in the list. The two types of data structure are too different to be reasonably implementable in terms of each other.


Explain and illustrate insertion sort algorithm to short a list of n numburs?

Explain and illustrate insertion sort algorithm to short a list of n numburs


What is the time complexity of operations in a doubly linked list?

The time complexity of operations in a doubly linked list is O(1) for insertion and deletion at the beginning or end of the list, and O(n) for insertion and deletion in the middle of the list.


Which is the easy insertion operator single linked-list or double-linked list?

It is easier to insert into a singly linked list.


How do you improve insertion sort algorithm?

If there was a way, it would be the new insertion sort! Theoretically you could reduce the time by using a linked list and searching to the position it needs to be inserted and inserting it. In practice however you would be better off simply using a different sort, especially if you don't want your data in a linked list. Selection sort is better when writing is expensive. Quicksort and Mergesort are faster on large data sets.


Can linked list represent in array if yes show how insertion and deletions can perform in array representation of inked list?

yes


Why you used link list in binary tree?

Linked list was introduced to reduce the space wastage done by array & also to make easier the insertion and deletion of elements from a list. A binary tree contains nodes of elements where insertion,deletion & searching is frequently done. So to make these operations easier linked list is used.


When is it more appropriate to use insertion sort than selection sort?

It is more appropriate to use insertion sort when the list is nearly sorted or has only a few elements out of place. Insertion sort is more efficient in these cases compared to selection sort.


How do you Write a program in C programming language to implement a queue using singly linked list?

A queue is a first in first out (FIFO) data structure. We can use a linked list to implement a queue by pushing new elements onto the end of the list and extracting existing elements from the front of the list. Given the simplicity of the structure, we do not require the full functionality of a linked list (a doubly-linked list), which includes bi-directional traversal and insertion/extraction elsewhere in the list. We also do not need to maintain a count of the elements. We can prevent bi-directional traversal simply by using a forward list (a singly-linked list). This also gets rid of the need to maintain a count of the elements because a forward list does not (or at least should not) maintain a count. A forward list allows constant-time insertion and extraction at the head only, so we need to change the representation to include a pointer to the tail. All insertions will be made at the tail and all extractions at the head, so we need to modify the push and pop methods accordingly. All other insertion/extraction methods can be removed completely. We can also get rid of any iterators into the list since we do not need to traverse a queue. The only other accessor we need is the empty() accessor so we can tell if the queue is empty or not. With these modifications in place, we now have a well-defined queue.