Reference no: EM13938034
Question 1
What is the time-complexity of the overloaded assignment operator?
1. O(1)
2. O(n)
3. O(log n)
4. O(n^2)
Question 2
template<class Type>
void linkedStackType<Type>::linkedOperation1()
{
nodeType<Type> *temp;
if(stackTop!=NULL)
{
temp=stackTop;
stackTop=stackTop->link;
delete temp;
}
else
cerr<<"ERROR"<<endl;
}
Question 3
Which stack operation is defined by linkedOperation1 above?
1. push
2. pop
3. top
4. copy
Question 4
template<class Type>
void linkedStackType<Type>::linkedOperation1()
{
nodeType<Type> *temp;
if(stackTop!=NULL)
{
temp=stackTop;
stackTop=stackTop->link;
delete temp;
}
else
cerr<<"ERROR"<<endl;
}
Question 5
What does it mean if stackTop equals NULL in the operation above?
1. The stack is full
2. The stack is empty
3. The element does not exist
4. The stack is nonempty but not full
Question 6
In a linear representation of a stack, which of the following values points to the top item in the stack?
1. stackTop
2. stackTop - 1
3. 0
4. -1
Question 7
#include <iostream>
#include "myStack.h"
using namespace std;
int main()
{
stackType<int> intStack(50);
stackType<int> tempStack;
intStack.push(18);
intStack.push(21);
intStack.push(25);
tempStack = intStack;
while(!tempStack.isEmptyStack())
{
cout<<tempStack.top()<<""; //output 1
tempStack.pop();
}
cout<<endl;
cout<<intStack.top()<<endl; //output 2
return 0;
}
Question 8
What is output 2 above?
1. 18
2. 21
3. 25
4. 50
Question 9
template<class Type>
Type stackType<Type>::operation2()
{
assert(stackTop != 0);
return list[stackTop - 1];
}
Question 10
Which stack operation is defined by operation2 above?
1. top
2. pop
3. push
4. isEmptyStack
Question 11
____ pointer(s) are needed to keep track of the front and rear of the queue.
1. Two
2. Three
3. Four
4. Five
Question 12
In the STL class queue the ____ function returns the number of elements in the queue.
1. num
2. count
3. sizeOf
4. size
Question 13
A technique in which one system models the behavior of another system is called ____.
1. modulation
2. comparison
3. analysis
4. simulation
Question 14
In queuing systems, queues of objects are waiting to be served by various ____.
1. operations
2. lists
3. customers
4. servers
Prepare the current liabilities and long-term debt portions
: Prepare the current liabilities and long-term debt portions of Craig's balance sheet at December 31, 2008. Provide a separate line item for each issue, but some items may need to be split into more than one item.
|
What is the sale price at kitchen hut
: On August 8, 2014, Leon’s Kitchen Hut bought a set of pots with a $136 list price from Lambert Manufacturing. Leon’s receives a 30% trade discount. Terms of the sale were 2/10, n/30. On August 14, Leon’s sent a check to Lambert for the pots. What is ..
|
Acting on both axis strain in both axis
: A plate of uniform thickness 15 mm and 200mm by 300mm if subjected to a force of 450 KN in the x and y axis. Calcualte the stresses acting on both axis strain in both axis. Take Young's Modules to be 209GPa and Poisson's ration to be 0.3
|
What is the market value of the firm prior to the recap
: An all equity business has 100million shares outstanding selling for $20 a share. Management believes that interest rates are unreasonably low and decides to execute a leveraged recapitalization. It will raise $1 billion in debt and repurchase 50 mil..
|
What is the time-complexity of the overloaded assignment
: What is the time-complexity of the overloaded assignment operator
|
Prepare a scatter graph of loan processing cost
: Estimate total profit in a month when 275 loans are processed. (Round to the nearest dollar.)
|
New firm in a rapidly growing industry
: The Bell Weather Co. is a new firm in a rapidly growing industry. The company is planning on increasing its annual dividend by 21 percent a year for the next 4 years and then decreasing the growth rate to 5 percent per year. The company just paid its..
|
The area of the triangle whose vertices
: Find the maximum and minimum values of f. (c) Sketch the graphs of f and f 0 (by hand) on separate xy-planes. Discuss briefly what is happening at x = -1 and x = 1. (d) Repeat (a) and (b) for the same f, but now with -2 ≤ x ≤ -1.
|
Different organisational structures and cultures
: Compare and contrast two different organisational structures and cultures. Explain how the relationship between an organisation‘s structure and culture can influence on the performance of the Asda's activities at this Irish site
|