what are the main applications of double linked list?
1. Applications that have an MRU list (a linked list of file names)
2. The cache in your browser that allows you to hit the BACK button (a linked list of URLs)
3. Undo functionality in Photoshop or Word (a linked list of state)
4. A stack, hash table, and binary tree can be implemented using a doubly linked list.
5. A great way to represent a deck of cards in a game.
Doubly linked lists are collections of "nodes", sometimes referred to conceptually as "chains". Each node contains a link (pointer) to the previous and next items as well as data pertaining to that node.
The main advantage of a linked list is that an item can be added to or removed from anywhere in the chain, even the middle. With a regular array, adding or removing an item to or from the middle means having to move the rest of the array in memory, which can be slower for large lists.
There are a wide variety of applications which use doubly linked lists:
Sometimes programmers will implement stacks or hash tables using doubly linked lists. Stacks are best employed using dynamic arrays, however, since memory doesn't need to be shifted around; using arrays instead of linked lists decreases memory usage and requires fewer malloc()/free() calls. Also, unless the heap's been severely fragmented, realloc() does not move data around when resizing arrays.
Hash tables are unlikely to require inserting nodes into the middle or top of the list, so the only advantage to using linked lists for hash tables is if items are to be deleted from the middle of the list. Otherwise, dynamic arrays are suitable.
The main Applications of Linked Lists are
* For representing Polynimials
* In Dynamic Memory Management
*In Symbol Tables
* Representing Sparse Matrix
4m Sai....
The main Applications of Linked Lists are
* For representing polynomials
It means in addition/subtraction /multiplication.. of two polynomials.
Eg:p1=2x^2+3x+7 and p2=3x^3+5x+2
p1+p2=3x^3+2x^2+8x+9
* In Dynamic Memory Management
In allocation and releasing memory at runtime.
*In Symbol Tables
in Balancing parentheses
* Representing Sparse Matrix
Memory management.......that is split and fullup the block..
applications of linked list
You copy a singly linked list into a doubly linked list by iterating over the singly linked list and, for each element, calling the doubly linked list insert function.
You may store received SMS's in a linked list:typedef struct RecvSMS {struct RecvSMS *next;PhoneNum from;time_t recvdate;char *text;} RecvSMS;
A list is an abstract data structure, usually defined as an ordered collection of data. A linked list refers to a specific implementation of a list in which each element in the list is connected (linked) to the next element.
If people started writing these codes here, then what software engineers will do?
Answersingly linked list has the node inserted only at one end. and the pointer corresponds to the next pointer.but in a doubly linked list, the node pointer points to the both previous and the next node.singly linked list has two nodesdoubly linked list has three nodesA doubly linked list makes sense when you need to traverse the list in both directions. You aren't able to do that with a singly linked list.
Outside of academia I do not think linked list are important, a btree is important. As for a real-world application, I do not recall one. I did use a linked list back in the days of the Apple 2/Commodore 64 but That was before hard drives (were affordable) and before I got my hands on btree source code.
You copy a singly linked list into a doubly linked list by iterating over the singly linked list and, for each element, calling the doubly linked list insert function.
A doubly linked list is a linked list in which each node knows where both of its neighbors are.A circular linked list is a linked list in which the "tail" of the list is linked to the "root". (Note that both the tail and root of the list are undefined/arbitrary in a circular linked list)Doubly linked lists are actually not necessarily related to circular linked list (aside from both being based on a linked list structure). In fact, you can have a circular doubly linked list, where each node knows where both of its neighbors are andwhere the list wraps around to connect to itself.
Good question, it defies an answer because I do not have the text book that your teacher is posing questions from. Besides when you have a btree linked lists look kind of stupid.
You may store received SMS's in a linked list:typedef struct RecvSMS {struct RecvSMS *next;PhoneNum from;time_t recvdate;char *text;} RecvSMS;
It is easier to insert into a singly linked list.
A list is an abstract data structure, usually defined as an ordered collection of data. A linked list refers to a specific implementation of a list in which each element in the list is connected (linked) to the next element.
Linked list of strings, for example.
If people started writing these codes here, then what software engineers will do?
In linked list, there are various operations in linked list that you can perform on linked list, eg: adding new elements, deleting elements, getting the first element, getting the next element after an element, any many others.
Answersingly linked list has the node inserted only at one end. and the pointer corresponds to the next pointer.but in a doubly linked list, the node pointer points to the both previous and the next node.singly linked list has two nodesdoubly linked list has three nodesA doubly linked list makes sense when you need to traverse the list in both directions. You aren't able to do that with a singly linked list.
linked list are used for creation of stack,queues to use memory in optimum manner linked list are used as they are dynamic in nature