Data Structure (NCO)
This test contains basics of data structures.
Questions
Which of the following is not a type of linear data structure?
- Array
- Graph
- Linked List
- Stack
- Queue
A set of values (carrier set) and operations on those values is called a/an
- data type
- abstract data type
- data set
- data structure
- identifier
Which of the following statements is not true about a stack data structure?
- In a stack, data is stored from only one side. It is called 'top of stack'.
- At a time only one item can be inserted or deleted in a stack.
- In a stack, after insertion operation, the value of top is decremented.
- Stack is a linear data structure.
- Stack is called LIFO [last in first out].
What is the name of a deletion operation in a stack?
- Push operation
- Pop operation
- Empty operation
- Dequeue operation
- Enqueue operation
Which of the following is not true about a queue data structure?
- In a queue, data is inserted from the front end of the queue.
- In a queue after insertion and deletion operations, value of front end and rear end is incremented, respectively.
- Queue is called FIFO [First in first out].
- At a time, only one item can be inserted or deleted in a queue.
- Queue is a linear data structure.
An arrangement of data in memory locations to represent values of carrier set of abstract data type is called a/an
- assertion
- container
- structure
- data structure
- array
Accessing each record/node exactly once, so that certain items in the record may be processed is called a/an
- insertion operation
- deletion operation
- search operation
- traversing operation
- sorting operation
Reverse polish notation form is also called
- infix form
- prefix form
- postfix form
- suffix form
- polish notation
A data structure in which elements may be added to or deleted from the front or the rear is called a
- queue
- dequeue
- priority queue
- circular queue
- stack
Which of the following statements is not correct about binary search tree?
- Values of in the left subtree are less than root.
- Values of in the right subtree are greater than or equal to the root.
- Each subtree is itself a binary search tree.
- They do not have a recursively defined data structure.
- The nodes at the lowest levels of the tree are known as leaves.
In an empty stack, perform the following operations: push (A), push (B), push (C), pop, pop, push (D), push (E), pop. What is the value of the top of the stack?
- D
- A
- B
- C
- E
Which sorting algorithm is pivot used for?
- Insertion sort
- Quick sort
- Selection sort
- Bubble sort
- Binary search
In any type of data structure, overflow condition occurs when
- any element is inserted into the data structure
- any element is deleted from the data structure
- a data structure is empty and you are trying to delete any element from it
- a data structure is full and you are trying to insert any element into it
- a data structure is half empty
Which of the following is a correct prefix notation of given expression "A + B * C"?
- +AB+C
- +A*BC
- ABC*+
- +AB*C
- +A+BC
What will be the value of the postfix expression 10, 5, 1, +, +, 4, /?
- 4
- 20
- 64
- 12
- 1
The maximum number of child nodes in a B-tree is
- 2
- 0
- 1
- m
- 4
A type of Linked list where the pointer in the last node points back to the first node is called a
- singly linked list
- circular singly linked list
- doubly linked list
- circular doubly linked list
- header linked list
Find out the postorder traversal of the binary tree if the preorder traversal is I J K L M N and inorder traversal is K J I M L N.
- K J I N M L
- K J M N L I
- M N L K J I
- N M K L J I
- N M L K I J
Find out the preorder traversal of the binary tree if the postorder traversal is S T Q U R P and inorder traversal is S Q T P R U.
- P Q S T R U
- P Q R S T U
- P Q S R U T
- Q S T P R U
- P Q S R T U
Which of the following traversal is used for Graph?
- In-order Traversal
- Reverse Polish Notation
- Pre-order Traversal
- Level order traversal
- Post-order Traversal
In which method of hashing function, a key is broken into several parts and each part has the same length as that of the required address except the last part?
- Division method
- Folding method
- Midsquare method
- Multiplicative method
- Digit analysis
What is equivalent reverse polish notation of the given infix notation "P * Q ^ R ^ S + T"?
- P Q R S ^ ^ * T +
- P Q R S ^ ^ * + T
- P Q R ^ S ^ * T +
- P Q * R ^ S ^ T +
- P Q * R ^ S T + ^
Which of the following is not correct about a B-tree?
- In a B-tree, each non-leaf node has a maximum of M children keys.
- Each node has one fewer key than the number of children with a maximum of M-1 keys.
- In a B-tree, each non-leaf node has a minimum of M/2 keys.
- In a B-tree, all leaves are not on the same level.
- It is also called a balanced m-way search tree.
In a tree, a node without parent is called a/an
- root node
- leaf node
- internal node
- pendent node
- child node
In delete operation of a binary tree, the next inorder successor node is replaced when a node has
- 0 child or leaf node
- 3 child nodes
- 1 child node
- 2 child node
- m child nodes
In an expression binary tree, the internal node stores
- operands
- operators
- alphabets
- special symbols
- functions
Collection of trees is known as ________?
- Group of trees
- Super-trees
- General trees
- Forest
- Sub-trees
In a tree, the number of direct children of any node is called
- branching factor
- height of tree
- depth of a node
- degree of node
- path length
Minimum spanning tree is the application of which data structure?
- Tree
- Graph
- Linked list
- Stack
- Queue
Which of the following is incorrect about a full binary tree?
- In a non-empty full binary tree, T has I internal nodes, then the total number of nodes is N = 2I + 1 and number of leaves is L = I + 1.
- If full binary tree T has a total of N nodes, the number of internal nodes is I = (N + 1)/2.
- In a non-empty full binary tree, T has I internal nodes, then the number of leaves is L = I + 1.
- If T has L leaves, the total number of nodes is N = 2L – 1.
- If T has L leaves, the number of internal nodes is I = L – 1.
A type of binary tree in which all levels except possibly the last are full, and the last level has all its nodes to the left side is called a
- full binary tree
- complete binary tree
- skewed binary tree
- binary search tree
- B-tree