Question
Which of the following represents the run time analysis of search function on a linked list? O(1) O(N) O(N^2) O(Log N) Which of the following
Which of the following represents the run time analysis of search function on a linked list?
O(1) | ||
O(N) | ||
O(N^2) | ||
O(Log N) | ||
Which of the following data structures could be considered a recursive data structure?
Linked lists |
Trees |
Both of the above |
None of the above
Which Data Structure will you choose to implement a car-wash system?
Stack |
Queue |
Binary Tree |
Binary Search Tree |
What does "var" represent in the following C++ code (assume that the code is valid)?
var.ShowOff();
structure |
structure pointer |
object |
object pointer |
None of the above
When a height balanced AVL tree becomes out of balance, which operation may bring balance to the tree?
Left Rotation |
Right Rotation |
Left then Right Rotation |
Right then Left Rotation |
Any or all all of the above, depending on the situation
What is the correct run time analysis of the following function?
void PrintItems(string Students[],int NumStudents) { cout << Students[NumStudents-1] << endl; }
O(1) |
O(N) |
O(Log N) |
None of the above
|
What might happen if you do not provide a base case while trying to implement a recursive function?
The function will not compile |
The function will not execute |
The function may create infinite number of calls to itself |
The function will run and complete successfully
|
Which of the following can help you to access the elements in a doubly linked list?
head pointer |
tail pointer |
median pointer |
all of the above |
What is the evaluation of this postfix expression?
1 10 9 3 / 4 * - +
When is Linear Search is always preferred over Binary Search?
When the Data is sorted | |
When the data is in an array | |
When the data is in a tree | |
When the data is not sorted |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started