2081 9

Data Structures and Algorithms20815 marksBasic operations in Linked List

What is the algorithm for node insertion and deletion from specified position from doubly linked list.

What is the algorithm for node insertion and deletion from specified position from doubly linked list. [5]

In a doubly linked list, each node has three fields: prev, info, and next. Steps: 1. Create a new node and set newnode-info = val 2. If head = NULL, then: - Set newnode-next = NULL - Set newnode-prev = NULL - Set head = newnode - Exit 3. If pos = 1 (insert at beginning), then: - Set newnode-next ...

Up nextExplain big oh notation in brief. Find big oh of the following function: f(x) = 5x4 + 9x2