-
What happens when you push a new node onto a stack?
Skill/Topic: Stacks using Linked ListA) the new node is placed at the front of the linked list.B) the new node is placed at the back of the linked list.C) the new node is placed at the middle of the linked list.D) No Changes happens
-
The ~Queue() member function is the Constructor ?
Skill/Topic: QueueA) TrueB) FalseExplanation: The ~Queue() member function is the destructor.It uses the delete operator to remove the array from memory when the instance of the Queue class goes out of scope.
-
The insertNodeAt() function can place a node at the front or back of a linked list if you pass the appropriate index to this function.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) TrueB) False
-
The size of a queue linked list can change during runtime?
Skill/Topic: Queues Using Linked ListsA) TrueB) False
-
-
What is the minimum number of nodes in a complete binary tree with height 4?
Select one:
8
11
3
4
-
If the depth of a tree is 3 levels, then what is the Size of the Tree?
Skill/Topic: TreeA) 8Explanation: You calculate the size of a tree by using the following formula: size = 2 ^ depth If the depth is 3 levels, then the size is 8, as shown here: 8 = 2 ^ 3
-
Stack Overflow
How will you identify Stack Overflow?
-
We toss a coin until a head appears. What is the expected number of coin tosses?
Select one:
4
1
0.5
2
-
-
Container Data Structures
What are the container data structures other than Arrays, Lists and Queues?
-
-
Which of the following abstract data types are NOT used by Integer Abstract Data type group?
Skill/Topic: Memory, Abstract Data Types, and AddressesA) ShortB) IntC) floatD) longExplanation: The integer abstract data type group consists of four abstract data types used to reserve memory to store whole numbers: byte, short, int , and long
-
-
The front of the stack in a stack-linked list ______________.
Skill/Topic: Stacks using Linked ListA) Back of the linked listB) Front of the linked listC) Middle of the Linked listD) None of the above
-
A linked list index is ____ that represents the position of a node in a linked list.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) An IntegerB) a variableC) a characterD) a boolean
-
The size of a tree is the number of nodes on the tree?
Skill/Topic: TreeA) TrueB) False
-
-
What is the running time to find the depth (dv) of a node v in a binary tree?
Select one:
O(1+dv)
O(n)
O(1)
O(dv) -
A multi-way search tree
A multi-way search tree has n items. The number of external nodes is Select one:
a) n2
b) logn
c) n
d) n+1
Data Structures Interview Questions
Ans