You would use linked lists instead of arrays in two instances:
1) You don't know how long your list will be and it is apt to dramatically change length.
2) You will make lots of additions and removals in the middle of your list.
Use a linked-list.
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 lists use dynamic memory allocation (also called "heap memory allocation", as the linked list is stored in heap memory).
the purpose of avail list in link list is to use deleted nodes again
void pointer
Use a linked-list.
Linked lists use more memory than arrays, and finding an element in the list requires scanning the entire list instead of simply using a base pointer and index. As a result, linked lists are not well suited for data with a large number of elements. They are best used for a small number of elements that use a lot of space (relatively speaking).
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
No.
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 lists use dynamic memory allocation (also called "heap memory allocation", as the linked list is stored in heap memory).
the purpose of avail list in link list is to use deleted nodes again
The PHP foreach construct is used to iterate over arrays. This is done in the field of mathematics. It will issue errors when one tries to use it as a variable instead of arrays and objects.
No. Arrays can be defined at runtime, just as they can in C. It's just that it's generally more convenient to use vectors instead of dynamic arrays at runtime, thus arrays are generally used statically, at compile time.
Use merge sortUse tree sort
Yes. The tail node's next node is the head node, while the head node's previous node is the tail node.
void pointer