- Computer Science Engineering (CSE)
- Data Structure (DS)
- To insert element at start, the previous...

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 |

View all MCQs in:
Data Structure (DS)

- When we insert an element in Queue, which pointer is increased by one?
- 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 ?
- 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.
- First link node of list is accessed from a pointer named
- How do you insert a node at the beginning of the list?
- Consider a standard Circular Queue 'q' implementation (which has the same condition for Queue Full and Queue Empty) whose size is 11 and the elements of the queue are q[0], q[1], q[2].....,q[10]. The front and rear pointers are initialized to point at q[2] . In which position will the ninth element be added?
- Any node is the path from the root to the node is called
- node.next -> node.next.next; will make
- What is the functionality of the following code? Choose the most appropriate answer. public int function() { if(head == null) return Integer.MIN_VALUE; int var; Node temp = head; Node cur; while(temp.getNext() != head) { cur = temp; temp = temp.getNext(); } if(temp == head) { var = head.getItem(); head = null; return var; } var = temp.getItem(); cur.setNext(head); return var; }

Login to Continue

It will take less than 2 minutes

Report MCQ