Step 1 : Introduction to the question "the efficient data structure to insert/delete a number in a stored set of numbers is"
Each node contains two fields, called links, that are references to the previous and to the next node in the sequence of nodes. The beginning and ending nodes' previous and next links, respectively, point to some kind of terminator, typically a sentinel node or null, to facilitate traversal of the list. If there is only one sentinel node, then the list is circularly linked via the sentinel nod
Step 2 : Answer to the question "the efficient data structure to insert/delete a number in a stored set of numbers is"
Doubly linked list operations are simpler and potentially more efficient (for nodes other than first nodes) because there is no need to keep track of the previous node during traversal or no need to traverse the list to find the previous node, so that its link can be modified.
Step 3 : Other interesting facts related to the question "the efficient data structure to insert/delete a number in a stored set of numbers is"
The two node links allow traversal of the list in either direction. The concept is also the basis for the mnemonic link system memorization technique. The link fields of a doubly linked list node are often called next and previous or forward and backward.
No comments:
Post a Comment