Question
Please answer all qu Q1: In the pop operation, for array implementation of stack, we set the return value to the Array[topOfStack] and the increment
Please answer all qu
Q1: In the pop operation, for array implementation of stack, we set the return value to the Array[topOfStack] and the increment topOfStack.
True or false
Q2:The height of a binary tree is O(log N).
True or false
Q3: The pop operation of stack deletes the first inserted element
True or false
Q4:in tree, A path is a sequence of nodes such that the next code in the sequence is a sibling of the previous.
True or false
Q5:
pick the right answer
-when we compute the sum of the numbers in a list as the following code:
Public static int sum( List
{
Int total =0;
For( int I = 0; i < N; i++)
Total += 1st.get( i );
return total;
}
a-The running time is O(N) for a LinkedList
b-The running time is O(1) for a LinkedList
c- The running time is O(N2) for a LinkedList
d- The running time is O(log n) for a LinkedList
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