McqMate

Q. |
## To insert element at start, the previous pointer of newly added node would point to ______ |

A. | null |

B. | next node |

C. | new node |

D. | head node |

Answer» A. null |

709

0

Do you find this helpful?

2

View all MCQs in

Data Structures (DS)No comments yet

- If we implement heap as min-heap, deleting root node (value 1)from the heap. What would be the value of root node after second iteration if leaf node (value 100) is chosen to replace the root at start.
- When we insert an element in Queue, which pointer is increased by one?
- To insert a new node in linked list free node will be available in ___________.
- Suppose you are given an implementation of a queue of integers. The operations that can be performed on the queue are: i. isEmpty (Q) — returns true if the queue is empty, false otherwise. ii. delete (Q) — deletes the element at the front of the queue and returns its value. iii. insert (Q, i) — inserts the integer i at the rear of the queue. Consider the following function: void f (queue Q) { int i ; if (!isEmpty(Q)) { i = delete(Q); f(Q); insert(Q, i); } }What operation is performed by the above function f ?
- What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of the list?
- if there are no nodes in linked list then start pointer will point at which value?
- In a queue, the initial values of front pointer f rare pointer r should be …….. and ……….. respectively.
- What would be the asymptotic time complexity to insert an element at the front of the linked list (head is known)?
- What would be the asymptotic time complexity to insert an element at the second position in the linked list?
- First link node of list is accessed from a pointer named