CS301 – Data Structures: Midterm Important MCQs (342 Solved Questions)
Computer Science • Read every solved MCQ with its verified answer key directly on this page. Free, no login required.
All 664 Midterm Packs · CS301 Course Page · CS301 Subjective Pack (34 Q&As)
-
Which one of the following statement is NOT correct .
Topic: Arrays, Lists & Linked Lists
- In linked list the elements may locate at far positions in the memory
- In an array the elements are contiguous
- In linked list the elements are necessarily to be contiguous ✓ Correct answer
- In linked list each element also has the next to it
-
Which one of the following statements is NOT correct?
Topic: Arrays, Lists & Linked Lists
- Binary Search Tree size can be changed after its creation
- AVL Tree size can be changed after its creation
- Array size can be changed after its creation. ✓ Correct answer
- Link List size can be changed after its creation
-
Which one of the following statements is correct?
Topic: Arrays, Lists & Linked Lists
- Link List size is fixed once it is created.
- AVL Tree size is fixed once it is created
- Array size is fixed once it is created ✓ Correct answer
- Binary Search Tree size is fixed once it is created
-
In which data structure does a programmer use two pointers in the node, i.e. one to point to the next node and the other to point to the previous node?
Topic: Arrays, Lists & Linked Lists
- Doubly-linked list ✓ Correct answer
- Stack
- Queue
- Linked list
-
In a singly linked list, the 'next' field of a node contains:
Topic: Arrays, Lists & Linked Lists
- The address of the next node ✓ Correct answer
- NULL in every node
- The address of the previous node
- The data of the next node
-
If we use an array to implement a list, then there is an issue that it gives difficulty when we:
Topic: Arrays, Lists & Linked Lists
- Access a value randomly
- Want to increase its size ✓ Correct answer
- Read the last element
- Traverse it from the start
-
If we use a singly linked list to implement a list, then there is an issue that it gives difficulty when we:
Topic: Arrays, Lists & Linked Lists
- Access a value randomly (random access) ✓ Correct answer
- Delete the head node
- Increase its size
- Insert a node at the head
-
An array is a group of consecutive related memory locations.
Topic: Arrays, Lists & Linked Lists
- True ✓ Correct answer
- False
-
A Linear Data Structure is the data structure in which data elements are arranged in a sequence or a linear list. Which of the following is Non Linear Data Structure?
Topic: Arrays, Lists & Linked Lists
- Binary Search Trees ✓ Correct answer
- LinkLists
- Arrays
- None of these
-
Each Node in singly link list,
Topic: Arrays, Lists & Linked Lists
- 3 pointers
- 4 pointers
- 1 pointer ✓ Correct answer
- 2 pointers
-
The Bag ADT is like the List ADT; it does not store items in any particular order and allows duplicates. The Bag class is efficiently implemented with a fixed array. Insert appends the new item at the end of the array. After executing: Bag b; b.insert(5); b.insert(4); b.insert(6); What will be the values of b.size and b.data?
Topic: Arrays, Lists & Linked Lists
- b.size is 3, b.data[0] is 6, b.data[1] is 4, b.data[2] is 5
- b.size is 3, b.data[0] is 5, b.data[1] is 4, b.data[2] is 6 ✓ Correct answer
- b.size is 3, b.data[0] is 4, b.data[1] is 5, b.data[2] is 6
- b.size is 3, b.data[0] is 6, b.data[1] is 5, b.data[2] is 4
-
In simple or singly linked list there is/are ________ pointer/s in each node.
Topic: Arrays, Lists & Linked Lists
- Two
- One ✓ Correct answer
- Four
- Three
-
The principal benefit of a linked list over a conventional array is that the order of the linked items may be_______ from the order that the data items are stored in memory.
Topic: Arrays, Lists & Linked Lists
- Different ✓ Correct answer
- Same
- Both
- None of these
-
In singly linked list a node comprises of __________ field/s.
Topic: Arrays, Lists & Linked Lists
- Five
- One
- Two ✓ Correct answer
- Six
-
The _______ method of list will position the currentNode and lastCurrentNode at the start of the list.
Topic: Arrays, Lists & Linked Lists
- End
- Start ✓ Correct answer
- Middle
- None of these
-
The back() method decreases the value of variable current by _____.
Topic: Arrays, Lists & Linked Lists
- Three
- One ✓ Correct answer
- Four
- Two
-
Each node in singly linked list contains_______
Topic: Arrays, Lists & Linked Lists
- Five Pointers
- Two Pointers
- Six Pointers
- One Pointers ✓ Correct answer
-
Which of the following is TRUE for search operations in a binary tree as compared to a linked list or an array?
Topic: Arrays, Lists & Linked Lists
- It decreases the number of comparisons ✓ Correct answer
- It keeps the number of comparisons exactly the same
- It increases the number of comparisons
- It involves no comparisons
-
The Josephus problem is resolved by the implementation of ____________.
Topic: Arrays, Lists & Linked Lists
- Singly linked list
- Circular linked list ✓ Correct answer
- Queue
- Stack
-
In a list, the tail() method of the 'current' pointer ____________.
Topic: Arrays, Lists & Linked Lists
- Deletes the last element
- Moves the 'current' pointer to the very last element ✓ Correct answer
- Returns the last element without moving the pointer
- Moves the 'current' pointer to the first element
-
When the add() operation of a linked list is called, the following action is done:
Topic: Arrays, Lists & Linked Lists
- A new node is made ✓ Correct answer
- The list is sorted
- The 'current' pointer moves to the head
- An existing node is deleted
-
In a tree, the search operation is _________ as compared to the linked list.
Topic: Arrays, Lists & Linked Lists
- Very fast ✓ Correct answer
- Of the same speed
- Not possible
- Very slow
-
In ___________, various cells of memory are not located continuously.
Topic: Arrays, Lists & Linked Lists
- Static memory
- Array
- Linked list ✓ Correct answer
- Stack implemented with an array
-
Array cells are _________ in computer memory.
Topic: Arrays, Lists & Linked Lists
- Randomly placed
- Contiguous ✓ Correct answer
- Linked to each other
- Scattered
-
In a doubly linked list, a node consists of three parts:
Topic: Arrays, Lists & Linked Lists
- 1 pointer and 2 data items
- 3 pointers
- 2 pointers and 1 data (object) ✓ Correct answer
- 3 data items
-
The last node in a circular linked list contains:
Topic: Arrays, Lists & Linked Lists
- One null pointer
- Two null pointers
- No null pointer ✓ Correct answer
- The address of the last node itself
-
The copy() method of the List data structure __________.
Topic: Arrays, Lists & Linked Lists
- Merges two lists
- Sorts one list
- Sets one list to be a copy of another ✓ Correct answer
- Deletes one list
-
The add(12) method of the linked list class will:
Topic: Arrays, Lists & Linked Lists
- Multiply every element by 12
- Add 12 nodes to the linked list
- Insert 12 only at the tail
- Add 12 as a value in the linked list ✓ Correct answer
-
A list is a collection of items of the ___________ type.
Topic: Arrays, Lists & Linked Lists
- Same ✓ Correct answer
- Different
- Any
- Mixed
-
The back() method of the List class is used to:
Topic: Arrays, Lists & Linked Lists
- Move the 'current' pointer to the first element
- Return the last element
- Move the 'current' pointer backward by one element ✓ Correct answer
- Delete the last element
-
The length() method of the List class is used to:
Topic: Arrays, Lists & Linked Lists
- Return the length of the list ✓ Correct answer
- Delete the list
- Copy the list
- Sort the list
-
Allocating and de-allocating memory for linked list nodes does take _________ time than a pre-allocated array.
Topic: Arrays, Lists & Linked Lists
- No
- More ✓ Correct answer
- Equal
- Less
-
In an array list, the worst case of removing an element is:
Topic: Arrays, Lists & Linked Lists
- Removal is equally costly from every position
- To remove the item from the middle
- To remove the item from the start ✓ Correct answer
- To remove the item from the end
-
Suppose currentNode refers to a node in a linked list (using the Node class with member variables called data and nextNode). What statement changes currentNode so that it refers to the next node?
Topic: Arrays, Lists & Linked Lists
- currentNode += nextNode;
- currentNode = nextNode;
- currentNode ++;
- currentNode = currentNode->nextNode; ✓ Correct answer
-
Which one is a self- referential data type?
Topic: Arrays, Lists & Linked Lists
- Stack
- Link list
- Queue
- All of these ✓ Correct answer
-
Each node in doubly link list has,
Topic: Arrays, Lists & Linked Lists
- 2 pointers ✓ Correct answer
- 4 pointers
- 3 pointers
- 1 pointer
-
Doubly Linked List always has one NULL pointer.
Topic: Arrays, Lists & Linked Lists
- True
- False ✓ Correct answer
-
In an array we can store data elements of different types.
Topic: Arrays, Lists & Linked Lists
- True
- False ✓ Correct answer
-
In an array list the current element is
Topic: Arrays, Lists & Linked Lists
- The middle element
- The last element
- The element where the current pointer points to
- The first element ✓ Correct answer
-
Which of the following is "TRUE" about arrays,
Topic: Arrays, Lists & Linked Lists
- We can neither increase nor decrease the array size after their creation. ✓ Correct answer
- We can decrease the size of arrays after their creation.
- We can increase the size of arrays after their creation.
- We can increase but can't decrease the size of arrays after their creation.
-
Is a data structure that can grow easily dynamically at run time without having to copy existing elements?
Topic: Arrays, Lists & Linked Lists
- List ✓ Correct answer
- Array
- Both of these
- None of these
-
Linked lists are collections of data items "lined up in a row" , insertions and deletions can be made only at the front and the back of a linked list.
Topic: Arrays, Lists & Linked Lists
- True
- False ✓ Correct answer
-
The ___________ method of list data structure removes the element residing at the current position.
Topic: Arrays, Lists & Linked Lists
- Next
- Find
- Add
- Remove ✓ Correct answer
-
Insertion in a linked list can be done at
Topic: Arrays, Lists & Linked Lists
- Somewhere in middle only
- Front only
- Front, back and somewhere in the middle ✓ Correct answer
- Back only
-
An array is a group of ---------------- memory locations.
Topic: Arrays, Lists & Linked Lists
- Scattered
- Consecutive ✓ Correct answer
- Isolated
- Random(non-consecutive)
-
Consider the following tree: 8 is the root; its left child is 5 and its right child is 3. Which of the following statements is correct about this tree?
Topic: Arrays, Lists & Linked Lists
- 7 is the parent of 3
- 9 is the root of this tree
- 5 is one the second level
- 3 and 5 are on the same level ✓ Correct answer
-
The next field in the last node of a singly-linked list is set to _________.
Topic: Arrays, Lists & Linked Lists
- -1
- NAN
- NULL ✓ Correct answer
- 1
-
Which of the following is the correct way to declare an array of 100 integers in C++?
Topic: Arrays, Lists & Linked Lists
- float x[100];
- int x[100]; ✓ Correct answer
- int x(100);
- integer x[100];
-
In a linked list, the elements are described as ______ elements.
Topic: Arrays, Lists & Linked Lists
- Self-referential ✓ Correct answer
- Contiguous
- Sequential
- Static
-
Which of the following is the time complexity of binary search in a sorted array?
Topic: Arrays, Lists & Linked Lists
- O(n log n)
- O(1)
- O(log n) ✓ Correct answer
- O(n)
-
Which of the following is true about a doubly linked list?
Topic: Arrays, Lists & Linked Lists
- It doesn’t allow circular traversal
- It only allows traversal in one direction
- It is slower for insertion and deletion
- It requires more memory than a singly linked list ✓ Correct answer
-
Which of the following operations can be done in O(1) time on a doubly linked list?
Topic: Arrays, Lists & Linked Lists
- Insertion at the head ✓ Correct answer
- Deletion from the middle
- Searching for an element
- None of the above
-
Which of the following is the time complexity of accessing an element in a linked list?
Topic: Arrays, Lists & Linked Lists
- O(n) ✓ Correct answer
- O(n^2)
- O(1)
- O(log n)
-
The operation for adding an entry to a stack is traditionally called :
Topic: Stacks & Queues
- add
- append
- insert
- push ✓ Correct answer
-
The operation for removing an entry from a stack is traditionally called:
Topic: Stacks & Queues
- peek
- delete
- pop ✓ Correct answer
- remove
-
In the linked list implementation of the queue class, where does the insert member function place the new entry on the linked list?
Topic: Stacks & Queues
- After all other entries that are smaller than the new entry
- At the tail ✓ Correct answer
- At the head
- After all other entries that are greater than the new entry
-
In the linked list implementation of the stack class, where does the push member function places the new entry on the linked list?
Topic: Stacks & Queues
- After all other entries that are greater than the new entry.
- At the tail
- After all other entries that are smaller than the new entry.
- At the head ✓ Correct answer
-
I have implemented the queue with a linked list, keeping track of a front pointer and a rear pointer. Which of these pointers will change during an insertion into an EMPTY queue?
Topic: Stacks & Queues
- Both change. ✓ Correct answer
- Neither changes
- Only front pointer changes.
- Only rear pointer changes.
-
I have implemented the queue with a linked list, keeping track of a front pointer and a rear pointer. Which of these pointers will change during an insertion into a NONEMPTY queue?
Topic: Stacks & Queues
- Only front pointer changes.
- Both change.
- Only rear pointer changes. ✓ Correct answer
- Neither changes
-
Stack and Queue can be implemented using __________.
Topic: Stacks & Queues
- Binary Search Tree
- Binary Tree
- Singly Link List ✓ Correct answer
- AVL Tree
-
A queue where the de-queue operation depends not on FIFO, is called a priority queue
Topic: Stacks & Queues
- False
- True ✓ Correct answer
-
Consider the following sequence of push operations in a stack: stack.push(’7’); stack.push(’8’); stack.push(’9’); stack.push(’10’); stack.push(’11’); stack.push(’12’);
Topic: Stacks & Queues
- 9 8 11 10 7 12
- 7 8 9 10 11 12 ✓ Correct answer
- 9 10 8 12 7 11
- 9 10 8 11 12 7
-
In simple implementation of stack, isFull() method is used due to …
Topic: Stacks & Queues
- Complexity of linked list
- Limitation of array ✓ Correct answer
- Strength of array
- Linked list of connectivity
-
Which of the following stack operations could result in stack underflow?
Topic: Stacks & Queues
- Two or more of the above answers
- pop ✓ Correct answer
- push
- is empty
-
Consider the following pseudo code: declare a stack of characters while (there are more characters in the word to read) { read a character; push the character on the stack } while (the stack is not empty) { pop a character off the stack; write the character to the screen } What is written to the screen for the input "carpets"?
Topic: Stacks & Queues
- serc
- steprac ✓ Correct answer
- ccaarrppeettss
- carpets
-
Given a stack of n items, how many POP and PUSH operations need to be performed to remove the item at its bottom?
Topic: Stacks & Queues
- n POP operations and n-1 PUSH operations ✓ Correct answer
- n POP operations and n PUSH operations
- 0 POP operation and 0 PUSH operation
- 1 POP operation and 1 PUSH operation
-
Which of the following is known as "Last-In, First-Out" or LIFO Data Structure?
Topic: Stacks & Queues
- Heap
- Tree
- Pointer
- Stack ✓ Correct answer
-
If numbers 5, 222, 4, 48 are inserted in a queue, which one will be removed first?
Topic: Stacks & Queues
- 7
- 5 ✓ Correct answer
- 8
- 6
-
Elements in a queue data structure are added from ______ and removed from ______.
Topic: Stacks & Queues
- Rear end, front end ✓ Correct answer
- Both from the rear end
- Front end, rear end
- Both from the front end
-
A queue is a data structure where elements are ___________.
Topic: Stacks & Queues
- Inserted in the middle and removed from the ends
- Inserted at one end and removed from the other end ✓ Correct answer
- Inserted and removed from both ends
- Inserted and removed from the same end
-
The stack implemented using an array causes worst-case behaviour when the insertion and deletion of an element are done from the ___________ of the array.
Topic: Stacks & Queues
- Middle
- Any position - there is no worst case
- Beginning ✓ Correct answer
- End
-
Stack.push(15) will push 15 on __________.
Topic: Stacks & Queues
- Front of the queue
- Middle of the stack
- Top of the stack ✓ Correct answer
- Bottom of the stack
-
Which operation of the queue data structure is used to get the front element from the queue and then remove it from the queue?
Topic: Stacks & Queues
- Peek()
- Enqueue()
- Remove() ✓ Correct answer
- Front()
-
Which operation of the queue data structure is used to insert an element into the queue?
Topic: Stacks & Queues
- Dequeue()
- Remove()
- Front()
- Enqueue() ✓ Correct answer
-
The dequeue() operation of a queue data structure is used to ____________.
Topic: Stacks & Queues
- Remove an element from the rear of the queue
- Add an element at the rear of the queue
- Remove an element from the front and return it ✓ Correct answer
- Return the front element without removing it
-
Which of the following functions does NOT belong to the Stack class?
Topic: Stacks & Queues
- push()
- Crash() ✓ Correct answer
- pop()
- top()
-
While implementing a stack with an array, and to achieve LIFO behaviour, we push and pop elements at the ___________ of the array.
Topic: Stacks & Queues
- Start ✓ Correct answer
- Both ends
- Middle
- End
-
Whenever we call a function, the compiler makes a stack; the top element of the stack is the _______ of the function.
Topic: Stacks & Queues
- Local variables
- Parameters
- Return address ✓ Correct answer
- Name
-
Suppose we have a circular array implementation of the queue class, with ten items in the queue stored at data[2] through data[11]. The CAPACITY is 42, i.e., the array has been declared to be of size 42. Where does the push member function place the new entry in the array?
Topic: Stacks & Queues
- data[12] ✓ Correct answer
- data[11]
- data[2]
- data[1]
-
________ is the maximum number of nodes that you can have on a stack-linked list ?
Topic: Stacks & Queues
- Any Number ✓ Correct answer
- Zero
- 2n (where n is the number of nodes in linked list)
- None of these
-
Which of the following can be used to reverse a string value,
Topic: Stacks & Queues
- Stack ✓ Correct answer
- Queue
- Both of these
- None of these
-
The following are statements related to queues. (i) The last item to be added to a queue is the first item to be removed (ii) A queue is a structure in which both ends are not used (iii) The last element hasn’t to wait until all elements preceding it on the queue are removed (iv)A queue is said to be a last-in-first-out list or LIFO data structure. Which of the above is/are related to normal queues?
Topic: Stacks & Queues
- (iii) and (ii) only
- (ii) and (iv) only
- (i), (ii) and (iv) only
- None of the given options ✓ Correct answer
-
A queue is a----- data structure, whereas a stack is a -----data structure.
Topic: Stacks & Queues
- both of these
- LIFO,FIFO
- FIFO, LIFO ✓ Correct answer
- none of these
-
Queue follows,
Topic: Stacks & Queues
- First in First out ✓ Correct answer
- Last in First out
- First in Last out
- None of these
-
We can add elements in QUEUE From _________
Topic: Stacks & Queues
- From Both Rare and Front
- Front
- Rear ✓ Correct answer
- None of these
-
Which of the following applications may use a stack?
Topic: Stacks & Queues
- Parentheses balancing program ✓ Correct answer
- Accessing shared resources
- Waiting list
- Buffering messages
-
New items are added at the ______ of the stack.
Topic: Stacks & Queues
- Top ✓ Correct answer
- Middle
- Center
- Bottom
-
_________ is the stack characteristic but ________ was implemented because of the size limitation of the array.
Topic: Stacks & Queues
- isEmpty(), isFull() ✓ Correct answer
- push(), pop()
- pop(), push()
- isFull(), isEmpty()
-
In which data structure is the de-queue operation NOT performed in the traditional FIFO (First In First Out) order?
Topic: Stacks & Queues
- Simple queue
- Priority queue ✓ Correct answer
- Linked list
- Queue
-
Which of the following statements is correct about queues and stacks?
Topic: Stacks & Queues
- Queues use one end; stacks use two ends
- Queues and stacks both use only one end
- Queues use two ends of the structure; stacks use only one ✓ Correct answer
- Queues and stacks both use two ends of the structure
-
Which of the following operations returns “most recently entered value” from the stack?
Topic: Stacks & Queues
- First
- Push
- Top ✓ Correct answer
- Recent
-
Which of the following operations can be performed using a priority queue?
Topic: Stacks & Queues
- Find the minimum element
- Find the maximum element
- Insert an element
- All of the above ✓ Correct answer
-
What is the time complexity of performing a push operation in a stack?
Topic: Stacks & Queues
- O(n^2)
- O(1) ✓ Correct answer
- O(log n)
- O(n)
-
Which of the following operations can be performed in O(1) time on a stack?
Topic: Stacks & Queues
- Peek
- Push
- Pop
- All of the above ✓ Correct answer
-
Which of the following is a non-linear data structure?
Topic: Trees & Binary Search Trees
- Binary Search Trees ✓ Correct answer
- Queue
- Linked List
- Stack
-
The _________ of a node in a binary tree is defined as the height of its left subtree minus height of its right subtree.
Topic: Trees & Binary Search Trees
- Balance ✓ Correct answer
- Width
- Level
- Height
-
The balance of a node in a binary tree is defined as the height of its __________ sub tree minus height of its right sub tree.
Topic: Trees & Binary Search Trees
- Lower
- Left ✓ Correct answer
- Right
- Upper
-
If the root of a tree is at level two in case of a complete binary tree i.e nodes will be at ___________.
Topic: Trees & Binary Search Trees
- 8
- 2
- 4 ✓ Correct answer
- 6
-
If the root of a tree is at level three in case of a complete binary tree i.e nodes will be at ___________.
Topic: Trees & Binary Search Trees
- 10
- 4
- 6
- 8 ✓ Correct answer
-
In which of the traversal method, the recursive calls can be used to traverse a binary tree ?
Topic: Trees & Binary Search Trees
- In inorder traversal only
- In preorder traversal only ✓ Correct answer
- In postorder traversal only
- All of the given options
-
The tree data structure is a
Topic: Trees & Binary Search Trees
- Data structure like queue
- Non-linear data structure ✓ Correct answer
- Graphical data structure
- Linear data structure
-
_________ is a binary tree where every node has a value, every node's left subtree contains only values less than or equal to the node's value, and every node's right subtree contains only values that are greater then or equal?
Topic: Trees & Binary Search Trees
- AVL tree
- Strictly Binary Tree
- Binary Search tree ✓ Correct answer
- All of these
-
Consider the following statements. (i) A binary tree can contain at least 2L Nodes at level L. (ii) A complete binary tree of depth d is a binary tree that contains 2L Nodes at each level L between 0 and d, both inclusive. (iii) The total number of nodes (T ) in a complete binary tree of depth d is 2 d+1 - 1 . n (iv) The height of the complete binary tree can be written as h = log (T+1)-1 where T is Total number of 2nn Nodes. Which one of the following is correct in respect of the above statements regarding the Binary trees?
Topic: Trees & Binary Search Trees
- (i) and (iii) only
- (ii), (iii) and (iv) only ✓ Correct answer
- (ii) and (iii) only
- (i), (ii) and (iii) only
-
Four statements about trees are below. Three of them are correct. Which one is INCORRECT?
Topic: Trees & Binary Search Trees
- The order of a tree indicates a maximum number of children allowed at each node of the
- If Tree1's size is greater than Tree2's size, then the height of Tree1 must also be greater than Tree2's height.
- Trees are recursively defined multi-dimensional data structures ✓ Correct answer
- A search tree is a special type of tree where all values (i.e. keys) are ordered
-
In a complete binary tree, for 25000 nodes the depth will be-----
Topic: Trees & Binary Search Trees
- 13
- 14 ✓ Correct answer
- 12
- 11
-
In level-order traversal for Binary Search Tree, __________ data structure is used.
Topic: Trees & Binary Search Trees
- Stack
- Queue ✓ Correct answer
- Heap
- Tree
-
If both left and right nodes of a node are NULL then this type of node is called a ------node.
Topic: Trees & Binary Search Trees
- Node
- Both
- Leaf ✓ Correct answer
- None of these
-
For searching a particular number in Binary Search Tree (if it is not present), the maximum number of comparisons will be _______ comparison(s) at each level.
Topic: Trees & Binary Search Trees
- 1 ✓ Correct answer
- 2
- 3
- 4
-
In a complete binary tree the number of nodes at level 5 are
Topic: Trees & Binary Search Trees
- 40
- 23
- 30
- 32 ✓ Correct answer
-
While implementing non-recursive traversal for Binary Search Tree, we need to implement _________.
Topic: Trees & Binary Search Trees
- Stack ✓ Correct answer
- Tree
- Pointer
- Heap
-
Left, right, info, and parent are the operations of _________ data structure.
Topic: Trees & Binary Search Trees
- Pointer
- Tree ✓ Correct answer
- Stack
- Heap
-
The abstract data type refers to the basic mathematical concept that defines the
Topic: Trees & Binary Search Trees
- Variable
- Functions
- Data type ✓ Correct answer
- Pointer
-
If the root of a tree is at level zero, its two children (subtrees) i.e. nodes will be at ________
Topic: Trees & Binary Search Trees
- Level 2
- Level 1 ✓ Correct answer
- Level 4
- Level 3
-
For making Binary Search Tree for Strings we need, ________ data type.
Topic: Trees & Binary Search Trees
- Int ✓ Correct answer
- Double
- Float
- Char
-
A BST generated from the data in ascending order is ____________.
Topic: Trees & Binary Search Trees
- Nonlinear
- Un sorted
- Balanced
- Linear ✓ Correct answer
-
Which of the following is a nonlinear data structure?
Topic: Trees & Binary Search Trees
- Pointer
- Tree ✓ Correct answer
- Stack
- Heap
-
~BinarySearchTree( ) is a _______________.
Topic: Trees & Binary Search Trees
- Constructor
- Switch case
- Template method call
- Destructor ✓ Correct answer
-
____ tree has been named after two persons Adelson-Velskii and Landis.
Topic: Trees & Binary Search Trees
- RED
- AVL ✓ Correct answer
- Binary search
- Tree
-
The _________ of a binary tree is the maximum level of its leaves (also called the depth).
Topic: Trees & Binary Search Trees
- Level
- Width
- Balance
- Height ✓ Correct answer
-
After deletion of a node from a binary search tree, _______ traversal method should be maintained.
Topic: Trees & Binary Search Trees
- Level order
- Post order
- Inorder ✓ Correct answer
- Preorder
-
When a node to be deleted from a BST has both left and right child, after deletion its _______ node will replace this node.
Topic: Trees & Binary Search Trees
- Successor
- Preorder successor
- inorder Successor ✓ Correct answer
- Predecessor
-
In a strictly complete binary tree, the number of __________ at any level k will be 2k.
Topic: Trees & Binary Search Trees
- Link
- Children
- Sets
- Nodes ✓ Correct answer
-
At a particular node, the difference in heights of its left and right subtree gives the _________ of the
Topic: Trees & Binary Search Trees
- Height
- Left subtree
- Balance ✓ Correct answer
- Right subtree
-
Making the tree unbalanced, it violates the ________ rule.
Topic: Trees & Binary Search Trees
- Queue
- Stack
- Linked list
- AVL ✓ Correct answer
-
Which one of the following case is the most complicated case to delete a node from BST?
Topic: Trees & Binary Search Trees
- Node to be deleted is the leaf node
- Node to be deleted has both the left and right children ✓ Correct answer
- No case is complicated
- Node to be deleted has either left child or right child
-
Which of the following traversal methods traverses the binary tree in sorted order?
Topic: Trees & Binary Search Trees
- postOrder() method
- inOrder() method ✓ Correct answer
- levelOrder() method
- preOrder() method
-
In a tree, we link the nodes in such a way that it ___________ a linear structure.
Topic: Trees & Binary Search Trees
- Always remains
- Does not remain ✓ Correct answer
- Becomes a sorted
- Becomes a circular
-
A binary tree is said to be a _____ binary tree if every non-leaf node in it has non-empty left and right subtrees.
Topic: Trees & Binary Search Trees
- Strictly ✓ Correct answer
- Complete
- Degenerate
- Perfect
-
We can calculate the ___________ of a subtree by counting its levels from the bottom.
Topic: Trees & Binary Search Trees
- Width
- Height ✓ Correct answer
- Degree
- Depth
-
In which traversal method is the root node visited at the last step?
Topic: Trees & Binary Search Trees
- Post-order traversal ✓ Correct answer
- Pre-order traversal
- In-order traversal
- Level-order traversal
-
A __________ is a tree in which every level, except possibly the last, is completely filled.
Topic: Trees & Binary Search Trees
- AVL tree
- Complete binary tree ✓ Correct answer
- Full binary tree
- Binary search tree
-
A sub-tree of a binary search tree should be ________.
Topic: Trees & Binary Search Trees
- A complete binary tree
- An array
- A binary search tree ✓ Correct answer
- A linked list
-
In which of the following trees is the value of each node greater than its left child and smaller than its right child?
Topic: Trees & Binary Search Trees
- Binary tree
- Binary search tree ✓ Correct answer
- Heap
- Complete binary tree
-
Suppose there is a tree with three nodes having numbers 14, 4 and 15. Which of the following is NOT a permutation (possible output order) of these nodes?
Topic: Trees & Binary Search Trees
- (14, 4, 15)
- (4, 4, 15) ✓ Correct answer
- (4, 14, 15)
- (15, 14, 4)
-
A leaf node of a binary search tree contains ________ null pointer(s).
Topic: Trees & Binary Search Trees
- No
- Three
- One
- Two ✓ Correct answer
-
The depth of a binary tree is:
Topic: Trees & Binary Search Trees
- The total number of nodes
- The level of the root node
- The maximum level of a leaf ✓ Correct answer
- The number of edges on the shortest root-to-leaf path
-
In level-order traversal of a binary search tree, we visit the nodes at each level before proceeding to the next level, in __________ direction.
Topic: Trees & Binary Search Trees
- Bottom-to-top
- Random
- Right-to-left
- Left-to-right ✓ Correct answer
-
___________ is a self-balancing tree.
Topic: Trees & Binary Search Trees
- Binary Search Tree
- AVL tree ✓ Correct answer
- Binary tree
- Complete binary tree
-
During in-order traversal using recursive calls, if we find that a node is NULL, it means this node will satisfy the condition that:
Topic: Trees & Binary Search Trees
- It is the root node
- It will not have a left child ✓ Correct answer
- It is a leaf node containing data
- It will have two children
-
Consider the following binary search tree (BST): A is the root; B and C are its left and right children; B has children D and E; C has children F and G; D has right child H; E has right child I; F has children J and K; G has children L and M. If node A in the BST is deleted, which two nodes are the candidates to take its place?
Topic: Trees & Binary Search Trees
- J and I ✓ Correct answer
- L and M
- H and E
- D and E
-
Let's call the node 'a' that requires re-balancing. Consider the two cases given below: 1) An insertion into left sub tree of the left child of a. 2) An insertion into right sub tree of the right child of a. Which of the following statement is correct about these two cases?
Topic: Trees & Binary Search Trees
- 1) The insertion occurs outside (i.e., left-left or right-right) in cases 1 and 2; single rotation can fix the balance in these two cases. ✓ Correct answer
- 2) The insertion occurs inside (i.e., left-left or right-right) in cases 1 and 2; single rotation cannot fix the balance in these two cases.
-
Consider the following tree: 14 is the root; its children are 2 and 11; 2 has children 1 and 3; 11 has children 10 and 30; 10 has left child 7; 30 has right child 40. How many of the nodes have at least one sibling?
Topic: Trees & Binary Search Trees
- 5
- 8
- 7
- 6 ✓ Correct answer
-
The nodes with no successor are called _________
Topic: Trees & Binary Search Trees
- Both of these
- Root Nodes
- Leaf Nodes ✓ Correct answer
- None of these
-
Which of the following abstract data types are NOT used by Integer Abstract Data type group?
Topic: Trees & Binary Search Trees
- Int
- float ✓ Correct answer
- long
- short
-
The difference between a binary tree and a binary search tree is that, a binary search tree has
Topic: Trees & Binary Search Trees
- in binary search tree nodes are inserted based on the values they contain ✓ Correct answer
- in binary tree nodes are inserted based on the values they contain
- two children per node whereas a binary tree can have none, one, or two children per node
- none of these
-
The following is a segment of a C program. int pqr(BinaryNode t) { if (t == null ) return -1; else return 1+max(pqr(t.left),pqr(t.right)) } Identify, what the above program intend(s) to do?
Topic: Trees & Binary Search Trees
- Compute the height of a binary tree using an in-order traversal
- Compute the depth of a binary tree using a post-order traversal ✓ Correct answer
- Compute the depth of a binary tree using a pre-order traversal
- Compute the height of a binary tree using a pre-order traversal
-
A node cannot be deleted when the node to be deleted has both left and right subtrees. (True / False)
Topic: Trees & Binary Search Trees
- True
- False ✓ Correct answer
-
Deleting a leaf node in binary search tree involves setting ______ pointer/s of that node's parent as null.
Topic: Trees & Binary Search Trees
- 4
- 2
- 1 ✓ Correct answer
- 3
-
The difference between a “Binary Tree (BT)” and a “Binary Search Tree (BST)” is that,
Topic: Trees & Binary Search Trees
- There is no difference
- In BT, nodes are inserted based on the value they contain
- A BST has two children per node whereas a BT can have none, one, or two children per node
- In BST, nodes are inserted based on the value they contain ✓ Correct answer
-
The worst case of searching in binary search tree (BST) is:
Topic: Trees & Binary Search Trees
- When the tree is balanced
- When the height of right sub-tree is greater than left sub-tree
- When the height of left sub-tree is greater than right sub-tree
- When the data inserted in BST is sorted ✓ Correct answer
-
Suppose n is the number of nodes in a complete Binary Tree then maximum steps required for a search operation are,
Topic: Trees & Binary Search Trees
- Log2 (n)
- Log2(n+1) - 1 ✓ Correct answer
- Log (n) – 1 2
- Log2 (n+1)
-
Which of the following is the correct order for post-order traversal of a binary tree?
Topic: Trees & Binary Search Trees
- Root, Left-subtree, Right-subtree
- Left-subtree, Right-subtree, Root ✓ Correct answer
- Left-subtree, Root, Right-subtree
- Right-subtree, Left-subtree, Root
-
Each node of a binary search tree (BST) contains:
Topic: Trees & Binary Search Trees
- Two pointers ✓ Correct answer
- Single pointer
- No pointers
- Four pointers
-
The balance of a node in the result of “height of left subtree” “height of right subtree.
Topic: Trees & Binary Search Trees
- Minus ✓ Correct answer
- Divided by
- Plus
- Multiply
-
The simplest case in a BST to delete a node is:
Topic: Trees & Binary Search Trees
- When the node, that is to be deleted is root node
- When the node, that is to be deleted has only one child
- When the node, that is to be deleted has both left and right child
- When the node, that is to be deleted is a leaf node… ✓ Correct answer
-
A complete binary tree having “N” nodes consists of ….. Levels.
Topic: Trees & Binary Search Trees
- Log2 (N-1) + 1
- Log2 (N-1) – 1
- Log2 (N+1) + 1
- Log2 (N+1) – 1 ✓ Correct answer
-
Which of the following is NOT a property of a binary search tree (BST)?
Topic: Trees & Binary Search Trees
- The right subtree of a node contains only nodes with values greater than the node’s value
- The height of the tree must always be balanced ✓ Correct answer
- It allows fast searching
- The left subtree of a node contains only nodes with values less than the node’s value
-
Which of the following is true about a tree data structure?
Topic: Trees & Binary Search Trees
- It is a linear data structure
- Each node has only one child
- It is a hierarchical data structure ✓ Correct answer
- It does not support recursive functions
-
What is the worst-case time complexity of a binary search tree (BST) when it is unbalanced?
Topic: Trees & Binary Search Trees
- O(n) ✓ Correct answer
- O(n log n)
- O(n^2)
- O(log n)
-
There are four cases of rotation in an __________ tree.
Topic: AVL Trees
- Binary
- AVL ✓ Correct answer
- Tree
- Heap
-
There is/are case/s for rotation in an AVL tree,
Topic: AVL Trees
- 3
- 4 ✓ Correct answer
- 1
- 2
-
What is the main use of an AVL tree?
Topic: AVL Trees
- Searching of data ✓ Correct answer
- Deletion of data
- Sorting of data
- Insertion of data
-
AVL Tree is,
Topic: AVL Trees
- Linear data structure
- Hybrid data structure (Mixture of Linear and Non Linear)
- Non Linear data structure ✓ Correct answer
- None of the given options.
-
An AVL tree is a linear data structure. (True / False)
Topic: AVL Trees
- True
- False ✓ Correct answer
-
An AVL tree is a non-linear data structure. (True / False)
Topic: AVL Trees
- True ✓ Correct answer
- False
-
We access elements in AVL Tree in,
Topic: AVL Trees
- Non Linear way only ✓ Correct answer
- Linear way only
- Both linear and non linear ways
- None of the given options.
-
A tree is an AVL tree if
Topic: AVL Trees
- All the nodes fulfill the AVL condition ✓ Correct answer
- At least half of the nodes fulfill the AVL condition
- Any one node fulfills the AVL condition
- None of the given options
-
Suppose we have the following values to be inserted in constructing AVL tree,10,13,15,5,7,8 Tell when first rotation will take place,
Topic: AVL Trees
- After inserting the node 25
- After inserting the node 10
- After inserting the node 15 ✓ Correct answer
- After inserting the node 20
-
To search an element in an AVL tree, it takes maximum 1.88 Log2n time. (True / False)
Topic: AVL Trees
- True
- False ✓ Correct answer
-
In Left-Right case of rotation in ________ tree. A double rotation is performed.
Topic: AVL Trees
- EVL
- VLA
- LVA
- AVL ✓ Correct answer
-
The _______of every node should be 1, 0 or -1 otherwise, it will not be an AVL tree.
Topic: AVL Trees
- AVL
- Tree
- Balance ✓ Correct answer
- Pointer
-
A node in AVL tree can become imbalanced due to
Topic: AVL Trees
- node does not imbalance due to insertion and deletion
- deletion operation
- both insertion and deletion operations ✓ Correct answer
- insertion operation
-
The insertion operation in AVL tree, generally takes more time than insertion operation in simple binary search tree"
Topic: AVL Trees
- Can be correct in some cases only
- Is always incorrect
- Insertion time is same in AVL and BST
- Always correct ✓ Correct answer
-
_________ of an empty AVL tree is defined to be -1.
Topic: AVL Trees
- Width
- Length
- Size
- Height ✓ Correct answer
-
The maximum height of an AVL tree with n nodes is approximately __________.
Topic: AVL Trees
- 4.44 log2 n
- log2 n
- 1.44
- 1.44 log2 n ✓ Correct answer
-
If a node is inserted on the outer side of a node in a binary search tree, then to make it an AVL tree, we:
Topic: AVL Trees
- May have to apply a single rotation ✓ Correct answer
- Must delete the inserted node
- Must apply a double rotation
- Never need any rotation
-
In case of insertion of a right inner node in a BST, we apply ___________ to make it an AVL tree.
Topic: AVL Trees
- Left rotation then right rotation ✓ Correct answer
- Right rotation then left rotation
- Single right rotation
- Single left rotation
-
In which case of insertion do we require a double rotation to make the AVL tree balanced?
Topic: AVL Trees
- Right-Right case
- Left-Right and Right-Left (inside) cases ✓ Correct answer
- Left-Left case
- None of the cases
-
Which one of the following is closest to an AVL tree (choose the best option)?
Topic: AVL Trees
- Binary tree
- Binary Search Tree ✓ Correct answer
- Heap
- Complete binary tree
-
A zigzag rotation is performed in the Left-Left case of rotation in an AVL tree. (True / False)
Topic: AVL Trees
- True
- False ✓ Correct answer
-
An AVL tree is a binary search tree. (True / False)
Topic: AVL Trees
- True ✓ Correct answer
- False
-
Every AVL is _________________.
Topic: AVL Trees
- Temary Tree
- Heap
- Binary Search Tree ✓ Correct answer
- Complete Binary Tree
-
Which of the following is the correct statement about an AVL tree?
Topic: AVL Trees
- It is identical to BCS except height of the left and right subtrees can be differ by at most 1 ✓ Correct answer
- It is identical to BCS except height of the left and right subtrees must be differ by at least 1
- It is not identical to BST, its totally different kind of tree.
- It is identical to BCS except height of the left and right subtrees can differ by at least 1.
-
Searching an element in an AVL tree takes maximum _______ time (when n is number of nodes in AVL tree)
Topic: AVL Trees
- Log 2 (n+1)-1
- 1.44 Log 2 n ✓ Correct answer
- Log 2 (n+1)
- 1.66 Log 2 n
-
Which of the following is true for an AVL tree?
Topic: AVL Trees
- It has a fixed height for all nodes.
- It is an unbalanced binary search tree.
- It is a type of binary search tree where the balance factor of each node is either 0, 1, or -1. ✓ Correct answer
- It is a type of binary tree that does not allow duplicates.
-
Each operator in a postfix expression refers to the previous ________ operand(s).
Topic: Expressions & Expression Conversion
- Two ✓ Correct answer
- Three
- Four
- One
-
a*(b+c)-d is an example of which type of expression?
Topic: Expressions & Expression Conversion
- Prefix expression
- Postfix expression
- Infix expression ✓ Correct answer
- None of the given options
-
AB+C* is an example of which type of expression?
Topic: Expressions & Expression Conversion
- Postfix expression ✓ Correct answer
- Prefix expression
- Infix expression
- None of these
-
What will be postfix expression of the following infix expression? Infix Expression: a+b*c-d
Topic: Expressions & Expression Conversion
- abc*+d- ✓ Correct answer
- ab+c*d-
- abcd+*-
- abc+*d-
-
What will be the postfix expression of the infix expression A + B + C / D - E?
Topic: Expressions & Expression Conversion
- A B + C D / + E - ✓ Correct answer
- A B + C D + / E -
- A B C D / + E - +
- A B C / D + + E -
-
The expression AB+C* is called?
Topic: Expressions & Expression Conversion
- Prefix expression
- Postfix expression ✓ Correct answer
- Infix expression
- None of these
-
Which data structure is needed to convert infix expression to postfix expression?
Topic: Expressions & Expression Conversion
- Stack ✓ Correct answer
- Pointer
- Tree
- Heap
-
Convert the following infix expression into postfix: 7/8 + 9
Topic: Expressions & Expression Conversion
- +78/*
- 9/78+
- 78/9+ ✓ Correct answer
- 87/9+
-
The -- is a decrement operator in C++ that decreases the value of the operand by _______.
Topic: Expressions & Expression Conversion
- One ✓ Correct answer
- Six
- Two
- Five
-
What will be the result of evaluating following expression? 5+3*2/(6-3)
Topic: Expressions & Expression Conversion
- 3
- 5
- 1
- 7 ✓ Correct answer
-
Which of the following is the correct postfix conversion of the infix expression Z + B - (D - H) / K?
Topic: Expressions & Expression Conversion
- Z+B-(D-H)
- ZB+DH-K/- ✓ Correct answer
- Z+B-(D-H)/K
- Z+B-(H-D)/K
-
The type of expression in which the operator succeeds (comes after) its operands is a ___________ expression.
Topic: Expressions & Expression Conversion
- Prefix
- Infix
- Postfix ✓ Correct answer
- Binary
-
The __________ rule applies for evaluating operators of the same precedence in an expression.
Topic: Expressions & Expression Conversion
- Associativity ✓ Correct answer
- Distributive
- Commutativity
- Precedence
-
The postfix forms of the expressions A + B * C and (A + B) * C will be ___________.
Topic: Expressions & Expression Conversion
- Different ✓ Correct answer
- Same
- Prefix forms
- Always identical
-
A subscript of an array may be an integer or an integer expression.
Topic: Expressions & Expression Conversion
- True ✓ Correct answer
- False
-
Suppose currentNode refers to a node in a linked list (using the Node class with member variables called data and nextNode). What boolean expression will be true when cursor refers to the tail node of the list?
Topic: Expressions & Expression Conversion
- (currentNode.data == 0.0)
- (currentNode->nextNode == null)
- (currentNode == null) ✓ Correct answer
- (nextNode.data == null)
-
Consider the following infix expression. 5 + 6/2 If one converts the above expression into postfix, what would be the resultant expression?
Topic: Expressions & Expression Conversion
- /62 + 5
- 5 6 2 / + ✓ Correct answer
- 56/ + 2
- 5 6 / 2 +
-
Which one of the following is a valid postfix expression?
Topic: Expressions & Expression Conversion
- abc+*d-
- (abc*)+d-
- abc*+d- ✓ Correct answer
- ab+c*d-
-
Consider the following infix expression: 3 + 5 * 6 – 7 * (8 + 5) Which of the following is a correct equivalent expression(s) for the above?
Topic: Expressions & Expression Conversion
- 3 5 6 + * 7 8 5 + - *
- 3 5 6 * + 7 8 5 + * - ✓ Correct answer
- 3 6 5 7 5 8 + * + - *
- 3 6 5 + * 7 5 8 + - *
-
Consider the following infix expression: x–y*a+b/c Which of the following is a correct equivalent expression for the above?
Topic: Expressions & Expression Conversion
- x *y a - b c / +
- x y a * - b/ + c
- xy-a*b+c/
- x y a * - b c / + ✓ Correct answer
-
Write in postfix form: 5 * (9 – 7)
Topic: Expressions & Expression Conversion
- 59*7-
- 5(97-)*
- 5(97-)
- 5 9 7 - * ✓ Correct answer
-
What will be result of following postfix expression? 123*+2–
Topic: Expressions & Expression Conversion
- 10
- 3
- 4 ✓ Correct answer
- 5
-
Which one of the following calling methods does not change the original value of the argument in the calling function?
Topic: Recursion, C++ Basics & Memory
- Call by passing the value of the argument ✓ Correct answer
- Call by passing the address of the argument
- Call by passing reference of the argument
- None of the given options
-
What is the maximum depth of recursive calls a function may make?
Topic: Recursion, C++ Basics & Memory
- n (where n is the argument)
- 2
- 1
- There is no fixed maximum ✓ Correct answer
-
Suppose that the class declaration of SomeClass includes the following function prototype: bool LessThan( SomeClass anotherObject ); Which of the following tests in the client code correctly compares two class objects alpha and beta?
Topic: Recursion, C++ Basics & Memory
- if (alpha.LessThan(beta)) ✓ Correct answer
- if (alpha.LessThan.beta)
- if (alpha < beta)
- if (LessThan(alpha, beta))
-
When should you use a const reference parameter?
Topic: Recursion, C++ Basics & Memory
- Whenever the data type might be many bytes, the function changes the parameter within its body, and you do NOT want these changes to alter the actual argument.
- Whenever the data type might be many bytes, the function changes the parameter within its body, and you DO want these changes to alter the actual argument.
- Whenever the data type might be many bytes.
- Whenever the data type might be many bytes, and the function does not change the parameter within its body. ✓ Correct answer
-
Which of the following is NOT true for a reference variable?
Topic: Recursion, C++ Basics & Memory
- Reference variables are declared with the '&' operator.
- References can be uninitialized. ✓ Correct answer
- A reference variable is an alias for a variable.
- Reference variables must be initialized when they are declared.
-
In the perspective of memory organization every process executing, the second part of the memory is for the ___________ of the program.
Topic: Recursion, C++ Basics & Memory
- Static code ✓ Correct answer
- Stack
- Data
- None of these
-
In the perspective of memory organization every process executing, the last part of the memory is for the ___________ of the program.
Topic: Recursion, C++ Basics & Memory
- Heap ✓ Correct answer
- Stack
- Code
- Data
-
In a program a reference variable, say x, can be declared as
Topic: Recursion, C++ Basics & Memory
- int *x ;
- int x ;
- int &x ; ✓ Correct answer
- None of the given options
-
Consider the function X as under int X (int& Value) { return Value; } Now a and b are integers in a calling function. Which one of the following is a valid call to the above function X.
Topic: Recursion, C++ Basics & Memory
- a = X (&b) ;
- a = X (b) ; ✓ Correct answer
- a = X (*b) ;
- None of the given options
-
In the call by .. methodology, a copy of the object is passed to the called function.
Topic: Recursion, C++ Basics & Memory
- Reference
- Reference & Value
- Value ✓ Correct answer
- Copy of the object can not be passed
-
Here is the start of a C++ class declaration: class foo { public: void x(foo f); void y(const foo f); void z(foo f) const; ... Which of the three member functions can alter the PRIVATE member variables of the foo object that activates the function?
Topic: Recursion, C++ Basics & Memory
- Only y can alter the private member variables of the object that activates the function.
- Only z can alter the private member variables of the object that activates the function.
- Only x can alter the private member variables of the object that activates the function.
- Two of the functions can alter the private member variables of the object that activates the function. ✓ Correct answer
-
“+” is a _________operator.
Topic: Recursion, C++ Basics & Memory
- Unary
- Ternary
- Binary ✓ Correct answer
- None of the above
-
Parameters in function call are passed using,
Topic: Recursion, C++ Basics & Memory
- Stack ✓ Correct answer
- AVL Tree
- Binary Search Tree
- Queue
-
In the statement int& a=b;
Topic: Recursion, C++ Basics & Memory
- a and b are two different variables names
- b hold the address of variable a
- a and b are two different names of the same memory location ✓ Correct answer
- a and b pointing to two different memory location
-
Given the class declaration: class MyClass { public: ... void Func(); private: int n; }; What notation does the body of Func use to assign the value 3 to n?
Topic: Recursion, C++ Basics & Memory
- MyClass.n = 3;
- It can't be done - n is private
- MyClass::n = 3;
- n = 3; ✓ Correct answer
-
Consider the following function: int& X(int& i) { i++; return i; } If b is an integer variable, which of the following is the valid function call?
Topic: Recursion, C++ Basics & Memory
- a = X(b); ✓ Correct answer
- a = X(*b);
- a = X(&b);
- None of the given options
-
Which one is the correct function call for the following function of calculating cube?
Topic: Recursion, C++ Basics & Memory
- cube(*num)
- cube(num) ✓ Correct answer
- cube(&&num)
- cube(&num)
-
------- is used for Reference variables in C++.
Topic: Recursion, C++ Basics & Memory
- @
- & ✓ Correct answer
- *
- #
-
If a function has recursive call as the last statement, it is known as ___.
Topic: Recursion, C++ Basics & Memory
- Local
- Tail recursive ✓ Correct answer
- Last
- Function
-
When a function calls another function, the parameters and return address of the calling function are put in ________.
Topic: Recursion, C++ Basics & Memory
- Pointer
- Tree
- Heap
- Stack ✓ Correct answer
-
Function signatures are also called :
Topic: Recursion, C++ Basics & Memory
- Function prototype ✓ Correct answer
- Function overloading
- Function overriding
- Function definition
-
If we return the reference of a local variable from a function it will cause:
Topic: Recursion, C++ Basics & Memory
- Dangling reference ✓ Correct answer
- deletion of local variable from memory
- duplication of local variable
- reference overloading
-
In the perspective of memory organization each process is divided into ________ sections.
Topic: Recursion, C++ Basics & Memory
- 4 ✓ Correct answer
- 6
- 2
- 8
-
The process of getting the value of a variable using pointers is called:
Topic: Recursion, C++ Basics & Memory
- Referencing
- Memory deallocation
- Memory allocation
- Dereferencing ✓ Correct answer
-
We allocate memory dynamically by using _______ operator.
Topic: Recursion, C++ Basics & Memory
- Decrement
- Increment
- New ✓ Correct answer
- This
-
_______________ parameter passing (by value or by reference) is similar to PASCAL.
Topic: Recursion, C++ Basics & Memory
- C++ ✓ Correct answer
- COBOL
- JAVA
- FORTRAN
-
Following is a keyword of C++ ____________
Topic: Recursion, C++ Basics & Memory
- Delete ✓ Correct answer
- Update
- Eliminate
- Remove
-
Local variables of a function are stored in,
Topic: Recursion, C++ Basics & Memory
- Stack ✓ Correct answer
- Heap
- Tree
- Pointer
-
We can make a lexicographic order of characters based on their ___.
Topic: Recursion, C++ Basics & Memory
- Binary digits
- Random choice
- ASCII values ✓ Correct answer
- Memory addresses
-
All the objects created using ___________ operator have to be explicitly destroyed using the delete operator.
Topic: Recursion, C++ Basics & Memory
- New ✓ Correct answer
- Construct
- Build
- Create
-
The computer memory can be thought of as a/an
Topic: Recursion, C++ Basics & Memory
- Heap
- Array ✓ Correct answer
- Tree
- Pointer
-
________ is utilized at the time of memory allocation in dynamic manner.
Topic: Recursion, C++ Basics & Memory
- Heap ✓ Correct answer
- Function
- Array
- Stack
-
Memory address is stored in
Topic: Recursion, C++ Basics & Memory
- Int
- Function
- Pointer ✓ Correct answer
- Array
-
_______ is the major factor to see the efficiency of a program.
Topic: Recursion, C++ Basics & Memory
- Time ✓ Correct answer
- Cost
- Maintance
- None of these
-
The _____ symbol is used when we want to get the value of a variable using pointer
Topic: Recursion, C++ Basics & Memory
- * ✓ Correct answer
- &
- #
- @
-
In which of the following function signatures, the value of variable “num” cannot be changed in function body?
Topic: Recursion, C++ Basics & Memory
- int cube(int *num)
- int &cube(int num)
- int cube(int num) ✓ Correct answer
- int cube(int &num)
-
The __________ sign before the name of the variable means that the address of the variable is being
Topic: Recursion, C++ Basics & Memory
- II
- #
- & ✓ Correct answer
- ::
-
__________ objects (objects accessed by pointers) are called anonymous objects.
Topic: Recursion, C++ Basics & Memory
- Nameless ✓ Correct answer
- Friend
- Public
- Private
-
The first statement in the given code is called as:
Topic: Recursion, C++ Basics & Memory
- Pre Class Declaration
- Forward Declaration ✓ Correct answer
- Binary Declaration
- Post Class Declaration
-
What will be output of the given C++ code? Char lhs[]= “Army”; Char rhs[]= “Army”; cout<<strcmp(lhs,rhs);
Topic: Recursion, C++ Basics & Memory
- Positive number
- 0 ✓ Correct answer
- Negative number
- Syntax Eroor
-
One should be careful about transient __________ that are stored by reference in data structures.
Topic: Recursion, C++ Basics & Memory
- Stack
- Tree
- Function
- Objects ✓ Correct answer
-
Which of the following is correct syntax to pass a constant variable by reference to a function?
Topic: Recursion, C++ Basics & Memory
- Int display (const int& val) ✓ Correct answer
- int display(const &int val)
- int display(int const val)
- int display(const int val)
-
What will be the return type of the findMin method in the statement given below? Int& findMin()const;
Topic: Recursion, C++ Basics & Memory
- constant integer
- integer pointer
- Integer reference ✓ Correct answer
- integer variable
-
To create a reference variable, we need to use _________ sign.
Topic: Recursion, C++ Basics & Memory
- Asterisk
- Dollar
- Sigma
- Ampersand ✓ Correct answer
-
Which of the following function(s) is/are used for function call by using pointers? void func1(int& num) { num++; } void func2(int* num){ num++; }
Topic: Recursion, C++ Basics & Memory
- Func2 ✓ Correct answer
- Func1
- Both
- None of these
-
In C++, we place the class interface in __________ file.
Topic: Recursion, C++ Basics & Memory
- .h ✓ Correct answer
- .hhh
- .cpp
- .ccp
-
Local variables defined inside a function body are ____ automatically at the end of function execution.
Topic: Recursion, C++ Basics & Memory
- Converted to global variables
- Moved to the heap
- Destroyed ✓ Correct answer
- Saved permanently
-
Two common models of simulation are _______ and __________.
Topic: Recursion, C++ Basics & Memory
- Discrete simulation and Analogue simulation
- Manual simulation and Computer simulation
- Static simulation and Dynamic simulation
- Time-based simulation and Event-based simulation ✓ Correct answer
-
During the execution of a process, the operating system constructs four sections for that process. Which of the following is NOT one of those sections?
Topic: Recursion, C++ Basics & Memory
- Linked list ✓ Correct answer
- Heap
- Code (text)
- Stack
-
A _________ model attempts to model a real-world phenomenon.
Topic: Recursion, C++ Basics & Memory
- Simulation ✓ Correct answer
- Traversal
- Sorting
- Searching
-
Factorial is an example of a __________ function.
Topic: Recursion, C++ Basics & Memory
- Static
- Inline
- Iterative
- Recursive ✓ Correct answer
-
_________ is when a function is calling itself.
Topic: Recursion, C++ Basics & Memory
- Function overloading
- Recursion ✓ Correct answer
- Looping
- Iteration
-
Which of the following is true in case of using recursive method calls?
Topic: Recursion, C++ Basics & Memory
- The code becomes very short ✓ Correct answer
- Execution is always faster than iteration
- No stack is used by recursion
- The code becomes very long
-
Generalized (generic) code written for a class is called a ___________.
Topic: Recursion, C++ Basics & Memory
- Structure
- Macro
- Function
- Template ✓ Correct answer
-
Which of the following statements is FALSE?
Topic: Recursion, C++ Basics & Memory
- Pointers store the address of a data element
- A stack follows LIFO order
- Pointers store the next data element of a list ✓ Correct answer
- A queue follows FIFO order
-
Suppose you are writing a class for a Node class and forgot to write the constructor of the class, then:
Topic: Recursion, C++ Basics & Memory
- A run-time error will occur
- The compiler will automatically generate a default constructor ✓ Correct answer
- Objects of the class cannot be created
- The program will not compile
-
In the internal memory organization of a process, there is some area of memory for static data that holds ____________ variables.
Topic: Recursion, C++ Basics & Memory
- Both static and global ✓ Correct answer
- Only global
- Only local
- Only static
-
What's wrong with the following loop? while( (i < 10) && (i > 24) ) { }
Topic: Recursion, C++ Basics & Memory
- There is a syntax error in the loop
- The loop runs exactly 10 times
- The condition is always true
- The condition is always false ✓ Correct answer
-
The lifetime of a transient object cannot exceed that of the application which is accessing it. (True / False)
Topic: Recursion, C++ Basics & Memory
- True ✓ Correct answer
- False
-
The data of the problem is of 2GB and the hard disk is of 1GB capacity, to solve this problem we should
Topic: Recursion, C++ Basics & Memory
- Use as much data as we can store on the hard disk
- Increase the hard disk space ✓ Correct answer
- Use the better algorithm
- Use better data structures
-
In C what is the operation that you can not do with primitive types?
Topic: Recursion, C++ Basics & Memory
- Assign a value to primitive type using a literal
- Create a new instance of primitive type with New keyword ✓ Correct answer
- Declare primitive types to be constant using the Const keyword
- None of these
-
Which one of the following operators has higher priority than all of others?
Topic: Recursion, C++ Basics & Memory
- Multiplication operator ✓ Correct answer
- Exponentiation operator
- Plus operator
- Minus operator
-
A Compound Data Structure is the data structure which can have multiple data items of same type or of different types.Which of the following can be considered compound data structure?
Topic: Recursion, C++ Basics & Memory
- LinkLists
- Binary Search Trees
- Arrays ✓ Correct answer
- All of the given options
-
Suppose a pointer has been declared in main but has not assigned any variable address then
Topic: Recursion, C++ Basics & Memory
- That pointer contains a NULL value
- That pointer points to First byte in main function
- That pointer points to any memory address ✓ Correct answer
- None of these
-
Which statement of the following statements is incorrect?
Topic: Recursion, C++ Basics & Memory
- Stack is a special kind of list in which all insertions and deletions take place at one end
- A list is a sequence of one or more data items
- Stacks are easier to implement than lists ✓ Correct answer
- Lists can be implemented by using arrays or linked lists
-
Which one of the following is correct about pointers?
Topic: Recursion, C++ Basics & Memory
- They may point to a singlememory location ✓ Correct answer
- The address of two pointer variables is same
- They always point todifferent memory locations
- None of these
-
Non-recursive calls are faster than which of the following calls?
Topic: Recursion, C++ Basics & Memory
- Non-Function
- Function
- Parameterized
- Recursive ✓ Correct answer
-
If class A defines class B as its friend, then:
Topic: Recursion, C++ Basics & Memory
- Class A can access private members of class B
- Class A can access only the public members of class B
- Class B can access only the public members of class A
- Class B can access private members as class A ✓ Correct answer
-
The variable which are destroyed automatically when a function’s execution ends are:
Topic: Recursion, C++ Basics & Memory
- Variable (objects) defined inside function body dynamically
- Variable (objects) defines inside function body statically
- Local variables defined inside function body ✓ Correct answer
- Global variables
-
The new operation in C++ for dynamically allocating memory returns.
Topic: Recursion, C++ Basics & Memory
- Both size and pointer to the memory it has allocated
- Pointer to the memory it has allocated ✓ Correct answer
- Value of the memory it has allocated
- Size of the memory it has allocated
-
Whenever we call a function, the compiler makes a _________ that it uses to fulfil this function call.
Topic: Recursion, C++ Basics & Memory
- Stack ✓ Correct answer
- Queue
- Linked list
- Heap
-
Recursive call of a function use data structure
Topic: Recursion, C++ Basics & Memory
- Linked List
- Stack ✓ Correct answer
- Table
- Queue
-
Consider the following function: void test_a(int n) { cout << n << " "; if (n>0) test_a(n-2); } What is printed by the call test_a(4)?
Topic: Recursion, C++ Basics & Memory
- 0 2 4
- 2 4
- 4 2 0 ✓ Correct answer
- 0 2
-
Which of the following is the best description of an algorithm?
Topic: Recursion, C++ Basics & Memory
- A well-defined computational procedure ✓ Correct answer
- A process that always terminates
- A mathematical model
- A set of instructions executed in parallel
-
In the calling function, after the execution of the function called, the program continues its execution from the _______ after the function call.
Topic: Arrays, Lists & Linked Lists
- Previous line
- Next line ✓ Correct answer
- Beginning
- None of the above
-
If there are 100,0000 unique members (nodes) stored in a complete binary tree, the tree will have ______ levels.
Topic: Arrays, Lists & Linked Lists
- 10
- 20 ✓ Correct answer
- 30
- 40
-
Consider we have performed the following operations on a stack of size 5. Push(10); Push(20); Push(30); Pop(); Pop(); Pop(); Push(40); Push(50); Pop(); After the completion of all operation, the top element in stack is _______.
Topic: Arrays, Lists & Linked Lists
- 10
- 20
- 40 ✓ Correct answer
- 50
-
STL is a _______ that is a part of the official standard of C++.
Topic: Arrays, Lists & Linked Lists
- C program file
- .h file
- .cpp file
- Library ✓ Correct answer
-
In AVL tree insertion occurs on the inside in case ____ and 3 which a single rotation cannot fix.
Topic: Arrays, Lists & Linked Lists
- 1
- 2 ✓ Correct answer
- 4
- 5
-
A template is a function or class that is written with a ________
Topic: Arrays, Lists & Linked Lists
- Specific
- Definite
- Generic ✓ Correct answer
- None of the above
-
Consider the following infix expression.
Topic: Stacks & Queues
- 7/8 + 9 ✓ Correct answer
- 8/7+9
- -7/8+9
- 78/+9
-
For a perfect binary tree of height h, having N nodes the sum of height of nodes is
Topic: Stacks & Queues
- N-h-1 ✓ Correct answer
- N-1
- N-1+h
- -(h-1)
-
Which of the following statement is correct for the variable “current- -“?
Topic: Stacks & Queues
- Current = current + 1
- Current = current - 1 ✓ Correct answer
- Current = current - 2
- Current – 1 = current
-
A software solution is said to be efficient if it solves the problem __________.
Topic: Stacks & Queues
- By using some extra resources
- Within no time
- By consuming more hardware resources
- Within its resources constraints ✓ Correct answer
-
Each node in a singly linked list contains two fields, one field called data field while other field contains:
Topic: Stacks & Queues
- Pointer to an integer
- Pointer to character
- Pointer to next node ✓ Correct answer
- Pointer to class
-
A _______ is a tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.
Topic: Stacks & Queues
- Strict binary tree
- Full binary tree
- Perfect binary tree
- Complete binary tree ✓ Correct answer
-
Binary search algorithm cannot be applied to ___
Topic: Stacks & Queues
- Sorted linked list ✓ Correct answer
- sorted binary trees
- sorted linear array
- None of given option
-
NULL is an invalid address and ________.
Topic: Stacks & Queues
- Accessible
- Inaccessible ✓ Correct answer
- Points to the start point of the list
- Points to the last point of the list
-
Can we store elements with different data types in a single array?
Topic: Stacks & Queues
- Yes
- No ✓ Correct answer
- In some cases
- None of given
-
Consider the following push operations of a stack: Stack.push(4); Stack.push(6); Stack.push(5); Stack.push(8); If a user calls a pop() operation, then which value will be returned?
Topic: Stacks & Queues
- 8 ✓ Correct answer
- 5
- 6
- 4
-
Binary search tree violates the condition of AVL tree when any node has balance equal to
Topic: Recursion, C++ Basics & Memory
- 2 or -2
- 1 or -1 ✓ Correct answer
- 0
- None of the options
-
In case of insertion of left outer node in BST,
Topic: Recursion, C++ Basics & Memory
- We apply single right rotation to make it AVL tree.
- We apply single left rotation to make it AVL tree.
- We first apply right rotation and then left rotation to make it AVL tree.
- We first apply left rotation and then right rotation to make it AVL tree. ✓ Correct answer
-
Int * i = new int[10]; Above given code will:
Topic: Recursion, C++ Basics & Memory
- Create an integer having value 10
- Allocate memory for 9 integers
- Allocate memory for 10 integers ✓ Correct answer
- Create 10 pointers of integer type
-
Which of the following data structure is linear type?
Topic: Recursion, C++ Basics & Memory
- Stack
- List
- Queue
- All of the above ✓ Correct answer
-
When an executable program runs, it is loaded in the computer memory and becomes a _______.
Topic: Recursion, C++ Basics & Memory
- Thread
- .h file
- Process ✓ Correct answer
- None of the above
-
There are ____ cases for deleting a node from binary search tree.
Topic: Recursion, C++ Basics & Memory
- 1
- 2
- 3 ✓ Correct answer
- 4
-
Suppose we have been given the following data set for a queue: 37524 What will be the resultant queue if we call a front() method?
Topic: Recursion, C++ Basics & Memory
- 7524
- 37524 ✓ Correct answer
- 75243
- 5 2 4
-
Suppose we have been given the following data set for a queue: 7524 What will be the resultant queue if we call enqueue(3) method? Note that 7 is the front element whereas 4 is rear element of queue.
Topic: Recursion, C++ Basics & Memory
- 7524
- 37524
- 75243 ✓ Correct answer
- 5243
-
What are the basic things associated with data structures?
Topic: Recursion, C++ Basics & Memory
- Space for each data item it stores
- Time to perform each basic operation
- Programming effort
- All of the above ✓ Correct answer
-
Which data structure allows deleting data elements from front anf inserting at rear?
Topic: Recursion, C++ Basics & Memory
- Stacks
- Queues ✓ Correct answer
- Deques
- Binary search tree
-
For a complete binary tree, the depth is calculated as____
Topic: Recursion, C++ Basics & Memory
- log2(number of nodes+1)-1 ✓ Correct answer
- log2(number of nodes*1)+1
- log2(number of nodes-1)-1
- log2(number of nodes-1)+1
-
Consider the linked list having data [6, 72, 35, 65,25] stored in it. While current pointer is pointing memory location having 72 stored in it. After calling remove() function on the following linked list current point will point to memory location having value?
Topic: Recursion, C++ Basics & Memory
- 6 ✓ Correct answer
- 35
- 65
- 25
-
Deleting a ______ node in BST is a ______ case.
Topic: Recursion, C++ Basics & Memory
- Root, simplest
- Left child, simplest
- Right child, simplest
- Leaf, simplest ✓ Correct answer
-
A stack carries _______ behavior.
Topic: Recursion, C++ Basics & Memory
- FIFO
- LIFO ✓ Correct answer
- AVCO
- FEFO
-
The smallest value element in a binary search tree(Each node with left and right pointer) lies at
Topic: Recursion, C++ Basics & Memory
- Root Node
- Left Child of Root
- Right Most Node
- Left Most Node ✓ Correct answer
-
y = &x[0]; In the above statement, we get the address of the fist location of the array x and store it in y. Here “y” is:
Topic: Recursion, C++ Basics & Memory
- rvalue
- xvalue
- lvalue ✓ Correct answer
- zvalue
-
Linked list use _______ to store data.
Topic: Trees & Binary Search Trees
- Array
- 2-D Array
- Variables ✓ Correct answer
- Linked Memory
-
A binary tree whose every node has either zero or two children is called _________.
Topic: Trees & Binary Search Trees
- Complete binary tree ✓ Correct answer
- Binary search tree
- Strictly binary tree
- None of above
-
If we use doubly linked list to implement list then there is an issue of
Topic: Trees & Binary Search Trees
- Next pointer of first node and pre pointer of last node are NULL
- Next pointer of first node and next pointer of last node are NULL
- Pre pointer of first node and next pointer of last node are NULL ✓ Correct answer
- Pre pointer of first node and pre pointer of last node are NULL
-
In node class one field is an integer data and other field will be _______
Topic: Trees & Binary Search Trees
- Pointer to class
- Pointer to node ✓ Correct answer
- Pointer to integer
- None of given options
-
For reference variables, ________ sign is used.
Topic: Trees & Binary Search Trees
- Ampersand ✓ Correct answer
- Asterisk
- Sigma
- Dollar
-
Maximum time that an insertion operation can take in AVL tree is _______. Here log stands for log to the base of 2.
Topic: Trees & Binary Search Trees
- Log (n) ✓ Correct answer
- 1.44 log (n)
- 1.66 log (n)
- Log (n+1)
-
The function calls are made with the help of ________.
Topic: Trees & Binary Search Trees
- Stack ✓ Correct answer
- Heap
- Dynamic memory
- External memory
-
An efficient program execute faster and helps in _____ the usage of resources like memory and disk
Topic: Trees & Binary Search Trees
- Maximizing
- Minimizing ✓ Correct answer
- Equalizing
- None of the given
-
___ only removes items in reverse order as they were entered
Topic: Trees & Binary Search Trees
- Queue
- Stack ✓ Correct answer
- Both of these
- None of these
-
We can not remove items randomly from ________
Topic: Trees & Binary Search Trees
- Stack
- Queue
- Both of these ✓ Correct answer
- None of these
-
if there are ___ nodes in an avl tree its levels will be roughly as log2(10 million)
Topic: Trees & Binary Search Trees
- 100 million
- 10 million ✓ Correct answer
- 5 million
- 2 million
-
For String-based Binary Search Tree, We use ASCII values of characters for comparing among letters. This method is known as ___
Topic: Trees & Binary Search Trees
- Lexicographic order ✓ Correct answer
- Alphabet coding procedure
- Asymmetric technique
- heap-based approach
-
During deletion of node from BST. if we found this node don't have in- order successor and predecessor. it means this node is____
Topic: Trees & Binary Search Trees
- Left Most node in the binary search tree
- Right most node in the binary search tree
- Root node ✓ Correct answer
- None of the given option
-
Which of the following a nonlinear tree
Topic: Trees & Binary Search Trees
- Stack
- Que
- Tree ✓ Correct answer
- Linked List
-
If a tree has a 50 Node then the total linked in the tree will be
Topic: Trees & Binary Search Trees
- 55
- 51
- 50
- 49 ✓ Correct answer
-
In which of the following trees is the value of each node greater than the values in its left subtree and smaller than the values in its right subtree?
Topic: Trees & Binary Search Trees
- Binary search tree ✓ Correct answer
- Heap
- Complete binary tree
- Expression tree
-
The postorder traversal of a binary tree is DEBFCA. What is the preorder traversal of the same tree?
Topic: Trees & Binary Search Trees
- ABDCEF ✓ Correct answer
- ABCDEF
- ABDECF
- ACBFED
-
In AVL tree during insertion, a single rotation can fix the balance in cases _________ and.
Topic: AVL Trees
- 1 ✓ Correct answer
- 2
- 3
- 4
-
Consider the following push operations of a Stack:
Topic: AVL Trees
- Stack.push(4);
- Stack.push(6);
- Stack.push(5);
- Stack.push(8); ✓ Correct answer
-
In case of insertion of a node at the left outer position in a binary search tree, which rotation is applied to make it an AVL tree?
Topic: AVL Trees
- 2 ✓ Correct answer
- 4
- 6
- 8
-
If there is a strictly complete binary tree of depth 3, the total number of nodes in it will be?
Topic: AVL Trees
- 2K ✓ Correct answer
- 0k
- 1k
- 3k
-
Suppose there are 100 elements in an equivalence classes so initially there will be 100 tree.The collection of tree is called_
Topic: AVL Trees
- Cluster ✓ Correct answer
- Class
- Forest
- Bunch
-
Every _____ tree is a binary search tree.
Topic: AVL Trees
- AVL ✓ Correct answer
- binary
- big
- small
-
In an AVL tree, insertion occurs on the inside in cases ______ and 3, which a single rotation cannot fix.
Topic: AVL Trees
- Infix ✓ Correct answer
- Postfix
- Prefix
- None of the above
-
Which of the following is the correct option for priority Queue?
Topic: AVL Trees
- The type of Queue that is not FIFO i.e the person who comes first may not leave first
- The type of Queue that is not FIFO i.e the person who comes first should leave first ✓ Correct answer
- The type of Queue that is not FIFO i.e the person who comes first should leave first
- The type of Queue that is not FIFO i.e the person who comes first may not leave first
-
The main use of AVL tree is:
Topic: AVL Trees
- Searching of data ✓ Correct answer
- Storing of data
- Insertion of data
- Security of data
-
What is the maximum height of an AVL tree with n nodes?
Topic: AVL Trees
- 1.44 log2 n ✓ Correct answer
- log2 n
- 2 log2 n
- n
-
Longest path from root node to farthest leaf node is called _______ of tree.
Topic: Expressions & Expression Conversion
- Level
- Length
- Depth ✓ Correct answer
- Node level
-
To represent hierarchical relationship between elements, which data structure is suitable?
Topic: Sorting
- Dequeue
- Priority
- Stack
- Tree ✓ Correct answer