Choose a topic to test your knowledge and improve your Data structure skills
Suppose implementation supports an instruction REVERSE, which reverses the order of elements on the stack, in addition to the PUSH and POP instructions. Which one of the following statements is TRUE with respect to this modified stack?
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 ?
Consider the following statements:i. First-in-first out types of computations are efficiently supported by STACKS. ii. Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations. iii. Implementing QUEUES on a circular array is more efficient than implementing QUEUES on a linear array with two indices. iv. Last-in-first-out type of computations are efficiently supported by QUEUES.Which of the following is correct?
Which of the following option is not correct?
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?
Overflow condition in linked list may occur when attempting to .............
Which of the following is not a type of Linked List ?
Linked list is generally considered as an example of _________ type of memory allocation.
Each Node contain minimum two fields one field called data field to store data. Another field is of type ____
If in a linked list address of first node is 1020 then what will be the address of node at 5th position ?
In Circular Linked List insertion of a node involves the modification of ____ links.
If a list contains no elements it is said to be
Linked list uses
Standard approach for implementation of a list is/are of
First link node of list is accessed from a pointer named
A linked list is made up of a set of objects known as
How do you calculate the pointer difference in a memory efficient double linked list?
How do you calculate the pointer difference in a memory efficient double linked list?
Which of the following name does not relate to stacks?
The postfix form of the expression (A + B)∗(C∗D − E)∗F / G is
What is the postfix form of the following prefix expression -A/B*C$DE ?
The data structure required to evaluate a postfix expression is
What is the postfix form of the following prefix:*+ab–cd
A queue is a,
In stack terminology, the __________operations are known as push and pop operations respectively.
A common example of a queue is people waiting in line at a__________.
What is one of the common examples of a stack?
When a stack is organized as an array, a variable named Top is used to point to the top element of the stack. Initially, the value of Top is set to_______to indicate an empty stack.
What happens when the stack is full and there is no space for a new element, and an attempt is made to push a new element?
The total number of elements in a stack at a given point of time can be calculated from the value of______.
When the push operation is performed on stack the value of TOS will be ______
A double linked list contains reference to _____
Data Structure that are created by user as per their requirement are known as
. To insert element at start, the previous pointer of newly added node would point to ______
In linked list implementation, a node carries information regarding
Which of the following data structure is linear type?
Stack is ____ type of data structure.
In stack deletion operation is referred as _____
Queue is _____ type of data structure.
Data structre is divided into _____ parts.
In ___ Data Structure data can be processed one by one sequentially
When we insert an element in Queue, which pointer is increased by one?
Which of the following is not the possible operation on stack?
Which of the following is a possible operation on queue?
In stack, to display the lastly inserted element without removing it, which function is used?
if there are no nodes in linked list then start pointer will point at which value?
Worst space complexity of queue data structure is
Worst space complexity of stack data structure is
Worst space complexity of singly linked list is
public int function() { if(head == null) return Integer.MIN_VALUE; int var; Node temp = head; while(temp.getNext() != head) temp = temp.getNext(); if(temp == head) { var = head.getItem(); head = null; return var; } temp.setNext(head.getNext()); var = head.getItem(); head = head.getNext(); return var; } What is the functionality of the following code? Choose the most appropriate answer.