Please see attached case, Williams v. State. Please read and provide a 1 page typed summary
discussing the facts, what the Court decided and why they ruled that way.
link:
http://opinions.aoc.arkansas.gov/weblink8/0/doc/207221/Page2.aspx
Solution
Title and Citation: Anderson V. State 102- Cite as 354 Ark. 102 (2003)
Facts of the Case:
Issues: The appellant professes that he was denied fair trial when the trial court allowed the State
court to cross-examine the felonies that were more than 10 year old.
Reasoning:
Based on the above, we cannot say that the trial court abused its discretion by excluding
testimony about specific instances of violent conduct by the victim. Appellant\'s defense was
self-defense, and he was allowed to testify that he was afraid of the victim. Moreover, the
incidents proffered to demonstrate violent conduct on the part of the victim would have
amounted to cumulative testimony. As such, for these reasons and because the decedent\'s
character is not an essential element of a self-defense for first-degree murder, we hold that the
trial court did not abuse its discretion in this regard..
Consider this code using the ArrayBag of Section 5.2 and the Locat.docxmaxinesmith73660
Consider this code using the ArrayBag of Section 5.2 and the Location class from Chapter 2. What is the output?
Location i = new Location(0, 3);
Location j = new Location(0, 3);
b.add(i);
b.add(j);
System.out.println(b.countOccurrences(i));
A. 0
B. 1
C. 2
D. 3
Suppose that b and c are Integer objects. A typical use of the clone method looks like this:
b = (Integer) c.clone( );
Write a short clear explanation of why the (Integer) type cast is required in this typical example.
A. obj = s;
B. s = obj;
C. s = (String) obj;
D. Two or more answers are correct.
Suppose that obj is an Object variable and s is a String variable. Which of the following statements
is a correctly-compiling widening conversion? Don't worry about possible run-time exceptions
A. obj = s;
B. s = obj;
C. s = (String) obj;
D. Two or more answers are correct.
Suppose that x and y are reference variables and a program activates x.equals(y). What occurs if x is the null reference?
A. A NullPointerException occurs
B. It always returns true.
C. It always returns false.
D. It returns true if y is also a null reference; otherwise it returns false.
Consider the implementation of the Stack using a partially-filled array.
What goes wrong if we try to store the top of the Stack at location [0] and the bottom of the Stack at the last used position of the array?
A. Both peek and pop would require linear time.
B. Both push and pop would require linear time.
C. The Stack could not be used to check balanced parentheses.
D. The Stack could not be used to evaluate postfix expressions.
Write some lines of code that declares an Integer object, using the Integer wrapper class.
Assign the value 42 to this object, then copy this value from the Integer object to an ordinary int variable.
Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
What is the maximum number of parentheses that will appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(()))?
A. 1
B. 2
C. 3
D. 4
E. 5 or more
Consider the usual algorithm to convert an infix expression to a postfix expression.
Suppose that you have read 10 input characters during a conversion and that the
stack now contains the symbols as shown below. Suppose that you read and process
the 11th symbol of the input. What symbol is at the top of the stack in the case where
the 11th symbol is each of the choices shown?
Which of the following stack operations could result in stack underflow?
Answer
A. is_empty
B. pop
C. push
D. Two or more of the above answers
What is the value of the postfix expression 6 3 2 4 + - *:
Answer
A. Something between -15 and -100
B. Something between -5 and -15
C. Something between 5 and -5
D. Something between 5 and 15
E. Something between 15 and 100
1. An array o.
Question 1 The syntax for accessing a class (struct) member .docxmakdul
Question 1
The syntax for accessing a class (struct) member using the operator -> is ____.
A.
pointerVariableName.classMemberName
B.
pointerVariableName->classMemberName
C.
pointerVariableName&->classMemberName
Question 2
Operations, such as finding the height, determining the number of nodes, checking whether the tree is empty, tree traversal, and so on, on AVL trees cannot be implemented the same way they are implemented on binary trees.
True
False
Question 3
The expression vecCont.empty() empties the vector container of all elements.
True
False
Question 4
Because a queue is an important data structure, the Standard Template Library (STL) provides a class to implement queues in a program.
True
False
Question 5
Every call to a recursive function requires the system to allocate memory for the local variables and formal parameters
True
False
Question 6
A linked list is a collection of ____.
A.
classes
B.
addresses
C.
nodes
Question 7
The deque class is a type of container adapter.
True
False
Question 8
The binary search algorithm uses the ____ technique to search the list.
A.
conquer-and-resign
B.
divide-and-conquer
C.
divide-and-divide
Question 9
Containers are essentially used ____.
A.
to manage objects of a given type
B.
to manipulate data
C.
to update objects that are part of a given set of elements
Question 10
The header node is placed at the ____ of a list.
A.
end
B.
beginning
C.
middle
Question 11
The use of a queue structure ensures that the items are processed in the order they are received.
True
False
Question 12
The analysis of algorithms enables programmers to decide which algorithm to use for a specific application.
True
False
Question 13
To define new classes, you create new ____ files.
A.
placeholder
B.
friend
C.
header
Question 14
Containers are class templates.
True
False
Question 15
Default arguments can be used with an overloaded operator.
True
False
Question 16
In breadth first traversal, starting at the first vertex, the graph is traversed as little as possible.
True
False
Question 17
The number of key comparisons in a sequential search depends on the value of the search item.
True
False
Question 18
____ iterators are forward iterators that can also iterate backward over the elements.
A.
Output
B.
Input
C.
Bidirectional
Question 19
We can traverse a singly linked list backward starting from the last node.
True
False
Question 20
In the random probing method, the ith slot in the probe sequence is ____.
A.
(h(X) % HTSize) + ri
B.
(h(X) + ri) % HTSize
C.
(h(X) + HTSize) % ri
D.
(h(X) % ri) + HTSize
Question 21
With the help of the ____, two values can be combined into a single unit and, therefore, can be treated as one unit.
A.
class unit
B.
class pair
C.
class double
D.
class tuple
Question 22
The operation ____ r ...
Consider this code using the ArrayBag of Section 5.2 and the Locat.docxmaxinesmith73660
Consider this code using the ArrayBag of Section 5.2 and the Location class from Chapter 2. What is the output?
Location i = new Location(0, 3);
Location j = new Location(0, 3);
b.add(i);
b.add(j);
System.out.println(b.countOccurrences(i));
A. 0
B. 1
C. 2
D. 3
Suppose that b and c are Integer objects. A typical use of the clone method looks like this:
b = (Integer) c.clone( );
Write a short clear explanation of why the (Integer) type cast is required in this typical example.
A. obj = s;
B. s = obj;
C. s = (String) obj;
D. Two or more answers are correct.
Suppose that obj is an Object variable and s is a String variable. Which of the following statements
is a correctly-compiling widening conversion? Don't worry about possible run-time exceptions
A. obj = s;
B. s = obj;
C. s = (String) obj;
D. Two or more answers are correct.
Suppose that x and y are reference variables and a program activates x.equals(y). What occurs if x is the null reference?
A. A NullPointerException occurs
B. It always returns true.
C. It always returns false.
D. It returns true if y is also a null reference; otherwise it returns false.
Consider the implementation of the Stack using a partially-filled array.
What goes wrong if we try to store the top of the Stack at location [0] and the bottom of the Stack at the last used position of the array?
A. Both peek and pop would require linear time.
B. Both push and pop would require linear time.
C. The Stack could not be used to check balanced parentheses.
D. The Stack could not be used to evaluate postfix expressions.
Write some lines of code that declares an Integer object, using the Integer wrapper class.
Assign the value 42 to this object, then copy this value from the Integer object to an ordinary int variable.
Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
What is the maximum number of parentheses that will appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(()))?
A. 1
B. 2
C. 3
D. 4
E. 5 or more
Consider the usual algorithm to convert an infix expression to a postfix expression.
Suppose that you have read 10 input characters during a conversion and that the
stack now contains the symbols as shown below. Suppose that you read and process
the 11th symbol of the input. What symbol is at the top of the stack in the case where
the 11th symbol is each of the choices shown?
Which of the following stack operations could result in stack underflow?
Answer
A. is_empty
B. pop
C. push
D. Two or more of the above answers
What is the value of the postfix expression 6 3 2 4 + - *:
Answer
A. Something between -15 and -100
B. Something between -5 and -15
C. Something between 5 and -5
D. Something between 5 and 15
E. Something between 15 and 100
1. An array o.
Question 1 The syntax for accessing a class (struct) member .docxmakdul
Question 1
The syntax for accessing a class (struct) member using the operator -> is ____.
A.
pointerVariableName.classMemberName
B.
pointerVariableName->classMemberName
C.
pointerVariableName&->classMemberName
Question 2
Operations, such as finding the height, determining the number of nodes, checking whether the tree is empty, tree traversal, and so on, on AVL trees cannot be implemented the same way they are implemented on binary trees.
True
False
Question 3
The expression vecCont.empty() empties the vector container of all elements.
True
False
Question 4
Because a queue is an important data structure, the Standard Template Library (STL) provides a class to implement queues in a program.
True
False
Question 5
Every call to a recursive function requires the system to allocate memory for the local variables and formal parameters
True
False
Question 6
A linked list is a collection of ____.
A.
classes
B.
addresses
C.
nodes
Question 7
The deque class is a type of container adapter.
True
False
Question 8
The binary search algorithm uses the ____ technique to search the list.
A.
conquer-and-resign
B.
divide-and-conquer
C.
divide-and-divide
Question 9
Containers are essentially used ____.
A.
to manage objects of a given type
B.
to manipulate data
C.
to update objects that are part of a given set of elements
Question 10
The header node is placed at the ____ of a list.
A.
end
B.
beginning
C.
middle
Question 11
The use of a queue structure ensures that the items are processed in the order they are received.
True
False
Question 12
The analysis of algorithms enables programmers to decide which algorithm to use for a specific application.
True
False
Question 13
To define new classes, you create new ____ files.
A.
placeholder
B.
friend
C.
header
Question 14
Containers are class templates.
True
False
Question 15
Default arguments can be used with an overloaded operator.
True
False
Question 16
In breadth first traversal, starting at the first vertex, the graph is traversed as little as possible.
True
False
Question 17
The number of key comparisons in a sequential search depends on the value of the search item.
True
False
Question 18
____ iterators are forward iterators that can also iterate backward over the elements.
A.
Output
B.
Input
C.
Bidirectional
Question 19
We can traverse a singly linked list backward starting from the last node.
True
False
Question 20
In the random probing method, the ith slot in the probe sequence is ____.
A.
(h(X) % HTSize) + ri
B.
(h(X) + ri) % HTSize
C.
(h(X) + HTSize) % ri
D.
(h(X) % ri) + HTSize
Question 21
With the help of the ____, two values can be combined into a single unit and, therefore, can be treated as one unit.
A.
class unit
B.
class pair
C.
class double
D.
class tuple
Question 22
The operation ____ r ...
Mcq 15-20Q15Which of the following trees are binary search trAbramMartino96
Mcq 15-20
Q15:
Which of the following trees are binary search trees?
. all of them
Q16:
Which of the following trees are binary search trees?
. all of them
Q17:
. all of them
Q18:
It is forbidden to place both private and abstract in front of a method declaration.
. true
. false
Q19:
Consider the binary search tree below:
What is the post-order path of this binary search tree?
Remember this in the post-order walk: First, we go through the left subtree. Then we cross the right subtree. Finally, we visit the root.
Q20:
Consider the following two classes:
After executing the code, we will have the following display:
Mcqs 7- ?
Q7:
Suppose A is an interface, B is a class that realizes interface A, and C is a class that extends class B.
Consider the following code:
Which of the test () method statements will print true to standard output?
Reminder: The java.lang.Object.getClass () method returns the runtime class of an object.
Q8:
Which ArrayList declaration is appropriate for a list that contains values of type float?
Q9:
What does the following method do in the context of a simply linked list?
. The method removes all nodes from the linked list.
. The method traverses the linked list without modifying it.
. The method reverses the linked list.
. The method removes every other node from the linked list.
Q10:
Suppose we have a single-linked sorted list whose nodes contain integer values. What is the mystery () method for in the following code snippet?
Question 10 options:
.The method removes every other node from the linked list.
.This method removes duplicates from the linked lis
.The method traverses the linked list without modifying it.
Q11:
Complete lines 27 and 28 of the following implementation (blanks 1 and 2) so that addLast (E value) adds a value to the end (back) of the doubly linked list.
Q12:
Consider the following doubly linked list. The values saved in the list are integers.
Now, suppose we run the tweak () method, shown below, on this doubly linked list.
Starting from the node designated by head, how will the values of the nodes be read after executing tweak ()?
Q13:
Consider a simply linked list. We want to write a private recursive method, E size (Node <E> current), to calculate the size of the list starting with the node designated by head via the public E size () method (also shown in the snippet below).
Which of the following choices corresponds to a correct implementation of the E size (Node <E> current) method?
Q13 options :
Q14:
The following List interface declares a subset of the methods of the java.util.List interface.
public interface List <E> {
void add ( int index , E elem ) ;
E remove (int index ) ;
boolean remove (E obj ) ;
int size ( ) ;
boolean isEmpty ( ) ;
//autres méthodes
}
For implementing this interface using an array, ArrayList.
Question 14 options:
.Insertions at intermediate positions in the list are always quick.
.Removing an item is always quick.
.Consulting the i ...
The number of key comparisons in a sequential search depends on the .pdfmichardsonkhaicarr37
The number of key comparisons in a sequential search depends on the value of the search item.
True
False
QUESTION 2
The structured design approach is also known as ____.
bottom-up design
top-down design
object design
QUESTION 3
The expression vecList.front() moves an element to the front of the vector.
True
False
QUESTION 4
Containers are essentially used ____.
to update objects that are part of a given set of elements
to manage objects of a given type
to manipulate data
QUESTION 5
The operation ____ reinitializes the stack to an empty state.
alloc
init
initializeStack
QUESTION 6
In a doubly linked list, some of the operations require modification from how they were
implemented for a regular linked list, because of the ____ pointer(s) in each node.
null
two
three
QUESTION 7
We can traverse a singly linked list backward starting from the last node.
True
False
QUESTION 8
A precondition is a statement specifying the condition(s) that must be true before the function is
called.
True
False
QUESTION 9
To remove, or pop, an element from the stack ____.
invert stackTop
decrement stackTop by 1
increment stackTop by 1
QUESTION 10
To define new classes, you create new ____ files.
header
friend
placeholder
QUESTION 11
A technique in which one system models the behavior of another system is called ____.
bench testing
simulation
referencing
QUESTION 12
With the help of the ____, two values can be combined into a single unit and, therefore, can be
treated as one unit.
class unit
class tuple
class double
class pair
QUESTION 13
A ____ is a list in which each element contains a key, such that the key in the element at position
k in the list is at least as large as the key in the element at position 2k + 1 (if it exists) and 2k + 2
(if it exists).
heap
hemp
hash table
QUESTION 14
Default arguments can be used with an overloaded operator.
True
False
QUESTION 15
The syntax for accessing a class (struct) member using the operator -> is ____.
pointerVariableName.classMemberName
pointerVariableName&->classMemberName
pointerVariableName->classMemberName
QUESTION 16
The components of a class are called the ____ of the class.
objects
members
operators
QUESTION 17
Operations, such as finding the height, determining the number of nodes, checking whether the
tree is empty, tree traversal, and so on, on AVL trees cannot be implemented the same way they
are implemented on binary trees.
True
False
QUESTION 18
The analysis of algorithms enables programmers to decide which algorithm to use for a specific
application.
True
False
QUESTION 19
A linked list is a collection of ____.
addresses
classes
nodes
QUESTION 20
In a ____, customers or jobs with higher priority are pushed to the front of the queue.
false queue
priority queue
free queue
double queue
QUESTION 21
When the destructor ____ the queue, it deallocates the memory occupied by the elements of the
queue.
instantiates
allocates
destroys
QUESTION 22
In breadth first traversal, starting at the first vertex, the graph is tra.
Write an informal paper that is exactly 3 pages long not counting th.pdffatoryoutlets
ually on June 30 and December 31. (FV of $1. PV of $1. FVA of $1. on June 30 No 01, 2018 on
2018 3,984,750 31, 2018
Solution
Par value of investment 75000000 Semi annual cash interest 3750000
(75000000*10%*6/12) Annuity factor for 20 period for 6% 11.4699 PV for 20th period
0.3118 Present value of Interest 43012125 Present value of Maturity amount
23385000 Issue price 66397125 Amort Schedule: Date Interest Interest Discount
Unamortized Book value Received Revenue Amortized Discount 01.01.18 8602875
66397125 30.06.18 3750000 3983828 233828 8369047 66630953 31.12.18 3750000
3997857 247857 8121190 66878810 Journal entries: Date Accounts title and
explanations Debit $ Credit $ 01.01.18 Investment in bonds Dr. 75000000 Cash account
66397125 Discount on bonds investment 8602875 30.06.18 Cash Account Dr.
3750000 Discount on bonds investment Account Dr. 233828 Interest revenue Account
3983828 31.12.18 Cash Account Dr. 3750000 Discount on bonds investment Account
Dr. 247857 Interest revenue Account 3997857.
Write a C program to find factorial of an integer n, where the user .pdffatoryoutlets
True or false. If Ax = 0 has an infinite number of solutions then every system Ax = b is
consistent. If true give a proof, otherwise give a counterexample.
Solution
Infinite solution of Ax=0 occurs when number of equations are less than number of variables.
same will be true for Ax=b because after adding non zero constant, number of equations will still
be less than number of variables.
Hence solution exists for Ax=b
which means Ax=b is consistent is true..
More Related Content
Similar to Q1. public void operationZ() throws StackUnderflowException { .pdf
Mcq 15-20Q15Which of the following trees are binary search trAbramMartino96
Mcq 15-20
Q15:
Which of the following trees are binary search trees?
. all of them
Q16:
Which of the following trees are binary search trees?
. all of them
Q17:
. all of them
Q18:
It is forbidden to place both private and abstract in front of a method declaration.
. true
. false
Q19:
Consider the binary search tree below:
What is the post-order path of this binary search tree?
Remember this in the post-order walk: First, we go through the left subtree. Then we cross the right subtree. Finally, we visit the root.
Q20:
Consider the following two classes:
After executing the code, we will have the following display:
Mcqs 7- ?
Q7:
Suppose A is an interface, B is a class that realizes interface A, and C is a class that extends class B.
Consider the following code:
Which of the test () method statements will print true to standard output?
Reminder: The java.lang.Object.getClass () method returns the runtime class of an object.
Q8:
Which ArrayList declaration is appropriate for a list that contains values of type float?
Q9:
What does the following method do in the context of a simply linked list?
. The method removes all nodes from the linked list.
. The method traverses the linked list without modifying it.
. The method reverses the linked list.
. The method removes every other node from the linked list.
Q10:
Suppose we have a single-linked sorted list whose nodes contain integer values. What is the mystery () method for in the following code snippet?
Question 10 options:
.The method removes every other node from the linked list.
.This method removes duplicates from the linked lis
.The method traverses the linked list without modifying it.
Q11:
Complete lines 27 and 28 of the following implementation (blanks 1 and 2) so that addLast (E value) adds a value to the end (back) of the doubly linked list.
Q12:
Consider the following doubly linked list. The values saved in the list are integers.
Now, suppose we run the tweak () method, shown below, on this doubly linked list.
Starting from the node designated by head, how will the values of the nodes be read after executing tweak ()?
Q13:
Consider a simply linked list. We want to write a private recursive method, E size (Node <E> current), to calculate the size of the list starting with the node designated by head via the public E size () method (also shown in the snippet below).
Which of the following choices corresponds to a correct implementation of the E size (Node <E> current) method?
Q13 options :
Q14:
The following List interface declares a subset of the methods of the java.util.List interface.
public interface List <E> {
void add ( int index , E elem ) ;
E remove (int index ) ;
boolean remove (E obj ) ;
int size ( ) ;
boolean isEmpty ( ) ;
//autres méthodes
}
For implementing this interface using an array, ArrayList.
Question 14 options:
.Insertions at intermediate positions in the list are always quick.
.Removing an item is always quick.
.Consulting the i ...
The number of key comparisons in a sequential search depends on the .pdfmichardsonkhaicarr37
The number of key comparisons in a sequential search depends on the value of the search item.
True
False
QUESTION 2
The structured design approach is also known as ____.
bottom-up design
top-down design
object design
QUESTION 3
The expression vecList.front() moves an element to the front of the vector.
True
False
QUESTION 4
Containers are essentially used ____.
to update objects that are part of a given set of elements
to manage objects of a given type
to manipulate data
QUESTION 5
The operation ____ reinitializes the stack to an empty state.
alloc
init
initializeStack
QUESTION 6
In a doubly linked list, some of the operations require modification from how they were
implemented for a regular linked list, because of the ____ pointer(s) in each node.
null
two
three
QUESTION 7
We can traverse a singly linked list backward starting from the last node.
True
False
QUESTION 8
A precondition is a statement specifying the condition(s) that must be true before the function is
called.
True
False
QUESTION 9
To remove, or pop, an element from the stack ____.
invert stackTop
decrement stackTop by 1
increment stackTop by 1
QUESTION 10
To define new classes, you create new ____ files.
header
friend
placeholder
QUESTION 11
A technique in which one system models the behavior of another system is called ____.
bench testing
simulation
referencing
QUESTION 12
With the help of the ____, two values can be combined into a single unit and, therefore, can be
treated as one unit.
class unit
class tuple
class double
class pair
QUESTION 13
A ____ is a list in which each element contains a key, such that the key in the element at position
k in the list is at least as large as the key in the element at position 2k + 1 (if it exists) and 2k + 2
(if it exists).
heap
hemp
hash table
QUESTION 14
Default arguments can be used with an overloaded operator.
True
False
QUESTION 15
The syntax for accessing a class (struct) member using the operator -> is ____.
pointerVariableName.classMemberName
pointerVariableName&->classMemberName
pointerVariableName->classMemberName
QUESTION 16
The components of a class are called the ____ of the class.
objects
members
operators
QUESTION 17
Operations, such as finding the height, determining the number of nodes, checking whether the
tree is empty, tree traversal, and so on, on AVL trees cannot be implemented the same way they
are implemented on binary trees.
True
False
QUESTION 18
The analysis of algorithms enables programmers to decide which algorithm to use for a specific
application.
True
False
QUESTION 19
A linked list is a collection of ____.
addresses
classes
nodes
QUESTION 20
In a ____, customers or jobs with higher priority are pushed to the front of the queue.
false queue
priority queue
free queue
double queue
QUESTION 21
When the destructor ____ the queue, it deallocates the memory occupied by the elements of the
queue.
instantiates
allocates
destroys
QUESTION 22
In breadth first traversal, starting at the first vertex, the graph is tra.
Write an informal paper that is exactly 3 pages long not counting th.pdffatoryoutlets
ually on June 30 and December 31. (FV of $1. PV of $1. FVA of $1. on June 30 No 01, 2018 on
2018 3,984,750 31, 2018
Solution
Par value of investment 75000000 Semi annual cash interest 3750000
(75000000*10%*6/12) Annuity factor for 20 period for 6% 11.4699 PV for 20th period
0.3118 Present value of Interest 43012125 Present value of Maturity amount
23385000 Issue price 66397125 Amort Schedule: Date Interest Interest Discount
Unamortized Book value Received Revenue Amortized Discount 01.01.18 8602875
66397125 30.06.18 3750000 3983828 233828 8369047 66630953 31.12.18 3750000
3997857 247857 8121190 66878810 Journal entries: Date Accounts title and
explanations Debit $ Credit $ 01.01.18 Investment in bonds Dr. 75000000 Cash account
66397125 Discount on bonds investment 8602875 30.06.18 Cash Account Dr.
3750000 Discount on bonds investment Account Dr. 233828 Interest revenue Account
3983828 31.12.18 Cash Account Dr. 3750000 Discount on bonds investment Account
Dr. 247857 Interest revenue Account 3997857.
Write a C program to find factorial of an integer n, where the user .pdffatoryoutlets
True or false. If Ax = 0 has an infinite number of solutions then every system Ax = b is
consistent. If true give a proof, otherwise give a counterexample.
Solution
Infinite solution of Ax=0 occurs when number of equations are less than number of variables.
same will be true for Ax=b because after adding non zero constant, number of equations will still
be less than number of variables.
Hence solution exists for Ax=b
which means Ax=b is consistent is true..
When was the black body mutation in drosophila melanogaster discover.pdffatoryoutlets
This is a Data Structures question... Discuss the time complexity of the following algorithm for
(i=5; i
Solution
The time complexity of the Algorithm displayed is O(N^2). Big O notation is the upper bound of
the function time complexity. The time complexity of a first For Loop is O(N). Since we have
nestedFor-Loop is also O(N). On combining both the loops we have O(N^2).
Hope Answer helps you..
What is it that consumer researchers try to find among varying cultu.pdffatoryoutlets
The right and left sternocleidomastoid muscles of humans originate on the upper surfaces of
breast bone and collar bones, pass along both sides of the neck, and insert just behind the ears on
the mastoid processes. Describe the action that occurs if both sides contract together.
Solution
If one sternocleido mastokd contracts, it flexes the cervical vertibral column to the same side and
rotates the head to the opposite side. When both the sides contract together , it flexes the neck
amd extends the head..
What are pros and cons of Symantec endpoint security softwareSo.pdffatoryoutlets
The number of milligrams of a drug in a person\'s body after t hours is given function N(t) = 18
middot e^-04t a) Find the amount of the drug after 5 hours. (Include units and round to two
decimal places) b) When will the amount of the drug be 0.3 milligram? (Include units and round
to two the nearest whole number) Represent the expression as a single logarithm with the
coefficient 1. Simplify your
Solution
1) N(t) = 18e^(-0.4t)
t = 5hrs ; N(5) = 18e^(-0.4*5) = 18*0.135335
= 2.46 mg
2) 0.3 = 18e^(-0.4t)
0.3/18 = e^-0.4t
Take natural log on both sides:
ln(0.3/18)/-0.4 = t
t= 10.235 = 10.24 = 10 hrs.
All of the following describe the International Accounting Standard .pdffatoryoutlets
a)
find the slope of the line and interpret the slope
The slope of the line is ?
b) interpret the slope
For every 2 unit change in x the y change is ____ units ?
Solution
Ans: Here we are given 2 points (0,0) & (2,1)
We calculate the linear slope by using the formula: (y2-y1)/(x2-x1)
Which here translates to (1-0)/(2-0) = 1/2 = 0.5
As the slope is positive we can interpret that the quantity plotted on y axis increases as the
quantity plotted on x axis increases.
As we know the slope (y2-y2)/(x2-x1) = 0.5 which gives (y2-y1) = 0.5×(x2-x1)
When x2-x1 = 2 units then y2-y1 = 0.5×2 = 1 unit
So for every 2 units change in x there is 1 unit change in y..
The right and left sternocleidomastoid muscles of humans originate o.pdffatoryoutlets
Suppose that many producers guess that there will be deflation, writing their contracts
accordingly.12.1.In the short run (compared to the original long run equilibrium), the economy
will experience aA. CPI staying the same and GDP decrease.B. CPI decrease and GDP
increase.C. CPI staying the same and GDP staying the same.D. CPI increase and GDP staying
the same.E. CPI staying the same and GDP increase.F. CPI decrease and GDP staying the
same.G. CPI increase and GDP increase.H. CPI decrease and GDP decrease.I. CPI increase
and GDP decrease.12.2.In the long run (compared to the original long run equilibrium), the
economy will experience aA. CPI increase and GDP staying the same.B. CPI decrease and
GDP decrease.C. CPI staying the same and GDP staying the same.D. CPI staying the same and
GDP decrease.E. CPI increase and GDP decrease.F. CPI decrease and GDP staying the
same.G. CPI staying the same and GDP increase.H. CPI decrease and GDP increase.I. CPI
increase and GDP increase.Suppose that many producers guess that there will be deflation,
writing their contracts accordingly.
Solution
a) At the time of deflation, the CPI will decrease and due to lack of demand, the GDP will fall as
well. The answer is \"H\", The CPI decrease the GDP decrease.
b) In the long run, the CPI will increase with the increasing demand and GDP will increase too.
The answer is \"I\", CPI increases GDP increases..
The code in image3.cpp has the error as shown above, could you help .pdffatoryoutlets
Select the correct answer.
6.41
5.41
5.409
5.411
Solution
1)Find the partial sumof the seriesrounded to the nearest thousandth. Question 7 options: n
an=5/4^n sum 1 1.2500 1.2500 2 0.3125 1.5625 3 0.0781 1.6406 4 0.0195 1.6602 5 0.0049
1.6650 6 0.0012 1.6663 7 0.0003 1.6666 8 0.0001 1.6666 9 0.0000 1.6667 10 0.0000 1.6667 11
0.0000 1.6667 none of answers fit 1.667 2)Given the series: and. Determine whether each
series is convergent or divergent. Question 8 options: a) converges because cos ^2(10n)is greater
than or equal to zero and less than 1 so series a is 1 so it converges and so does a b diverges
because cos is greater than or equal to -1 and less than or equal to 1, which does not converge to
0, so b diverges ans Ais convergent,Bis divergent. 3)Determine whether the series converges
or diverges. NO SERIES Select the correct answer. Question 9 options: neither diverges
converges 4)Determine whether the sequence converges or diverges. diverges because n(n-6)
goes to infinity as n goes to infinity Question 10 options: converges diverges.
the ability of the cardiac muscle cells to fire on their own is .pdffatoryoutlets
Save
Save
Save
Makes the production function steeper.
Makes the production function flatter.
Move the economy along the production function.
Shift up the production function.
Solution
7) Production function=y=f(capital per worker). So when capital per worker has increased the
slope of the production function will be increased. So increase capital per worker makes the
production function steeper. The first option is correct.
8) When technology improved economy can produce more output with same input that is capital
per worker will be increased. The production function becomes steeper. The third option is
correct.
9) If technology advances, more output can be produced with same inputs. The fourth option is
correct..
Template LinkedList;I am using templates to make some linkedLists.pdffatoryoutlets
Sargent Corporation bought equipment on January 1, 2013. The equipment cost $180,000 and
had an expected salvage value of $30,000. The life of the equipment was estimated to be 6 years.
The book value of the equipment at the beginning of the third year using straight-line
depreciation would be . C $180,000. $150,000. $130,000. $50,000.
Solution
As per the information provided, Sargent Corporation bought an equipment on Jan 1, 2013 for
$180000 with 6 years life and salvage value of $30000.
Therefore, depreciation expense every year as per Straight line method would be:-
Equipment cost = $180000
LESS:- Salvage value = $30000
Amount on which depriciation is to be charged =$150000
Now, depreciation as per straight line method = $150000 / 6 years
= $25000 every year
Now, book value of Equipment at the beginning of third year is:-
Equipment cost = $180000
LESS :- Depreciation for first and second year = $25000 x 2 years = $50000
Therefore, book value at begginning of third year =$130000
Hence, as per the problem \"Option C\" is correct with book value of $130000..
Surface water entering the North Atlantic may have a temperature of .pdffatoryoutlets
Road racing bikes have special seats that are flexible with minimum contact with cyclists. These
seats are called toupe saddles. Roscoe Specialty Equipment makes 100 of these seats per day
with the following resources. Labor: 40 hours per day @ $15.00 per hour Raw material: 20
kilograms per day @ $1.00 per kg Energy: $200 per day Capital costs: $500 per day
A) What is the labor productivity per labor hour for these toupe saddles at Roscoe?
B) What is the multifactor productivity for these toupe saddles at Roscoe?
C) What is the % change in multifactor productivity if Roscoe can reduce the energy bill by $150
per day without cutting production or changing any other inputs?
Solution
A)
Labor productivity = Total Output / Total Man-Hours
= 100 / 40
= 2.5 units per labor hour
B)
Multifactor productivity =
Quality produced at standard price/(Labor cost + Material cost + Overhead)
= 100 / ( 40 x $ 15 + 20 x $ 1 + $ 200 + $ 500)
= 0.076 per $ of input
C)
New MFP
= 100 / ( 40 x $ 15 + 20 x $ 1 + $ 50 + $ 500)
= 0.085 per $ of input
Percentage increase in Multi Factor Productivity
= (0.085 - 0.076) / 0.076
= 11.84% Increase in Multi Factor Productivity..
Suppose the rate of plant growth on Isle Royale supported an equilib.pdffatoryoutlets
Research article reports will be completed for evaluation using the guidelines identified below.
Chapter concepts should be included throughout all written assignments - Performance
Management / Employee Development / Employee Separation and Retention
Each report is expected to be between 500 and 700 words.
Reference the article using APA format. Include a link to the article if online. Wikipedia is not
recognized as a quality source.
Concisely and precisely summarize the article.
Identify the key HR issues and correlated the contents of the article to the weekly reading
assignment.
Identify questions that you have developed as a result of your analysis.
Describe how the article’s subject contributes to the subject of HR.
If you were the author writing the article, identify what would you change and why.
Solution
Performance Management - Definition
Performance management is an ongoing process of communication between a supervisor and an
employee that occurs throughout the year, in support of accomplishing the strategic objectives of
the organization. The communication process includes clarifying expectations, setting objectives,
identifying goals, providing feedback, and reviewing results.
Managing Employee Performance – The Cycle
Overseeing performance and providing feedback is not an isolated event, focused in an annual
performance review. It is an ongoing process that takes place throughout the year. The
Performance Management process is a cycle, with discussions varying year-to-year based on
changing objectives.
The cycle includes Planning, Checking-In, and Review.
Components of Performance Management System
Any effective performance management system includes the following components:
Employee Development
Individuals in an organization form its vital resource and must be valued, nurtured and retained.
Employees are the most valuable assets and truly the backbone of an organization. Every
employee in his/her own way contributes towards the success or failure of an organization.
Without employees in an organization, even the most powerful machinery with the latest
technology would not function.
Employees should not treat their organization as a mere source of earning money. Remember,
your job is not just to come in the morning, leave in the evening and receive your paycheck. On
the other hand employers should not treat their employees as slaves. Employers must invest their
time and resources in training and developing their workforce for them to become indispensable
resources later on. Employees should be developed and prepared to face even the worst
situations.
What is Employee Development ?
Employee development is a joint initiative of the employee as well as the employer to upgrade
the existing skills and knowledge of an individual. It is of utmost importance for employees to
keep themselves abreast with the latest developments in the industry to survive the fierce
competition. Believe me, if you are not aware of what is happening aroun.
Print Calculator Question 18 of 20 Sapling Learning Map do ment of Lu.pdffatoryoutlets
Part C please Determine if the following set is a vector space under the usual addition and scalar
multiplication. If it is, find its dimension. If it is not, answer by NO. Justify your answer. The set
of all numbers of the form c_1 e + c_2 pi, where c_1, c_2 Element R^1 All vectors x in R^5
such that |x_1 + x_5| + |x_2 + x_4| = 0 All 3 times 3 matrices such that each such mat has at
least one irrational entry.
Solution
C) Let S denote the set.
Since the matrices are of order 3x3 with atleast one irrational entry. As 0 is not an irrational
number so the zero matrix is not an element of the given set S.
So there is no matrix O in S such that for any A in S
O+A=A+O
Hence there is no identity element in the given set S
Hence it\'s not a vector space.
Part A 1. Solid product forms during the addition of the bleach solu.pdffatoryoutlets
National Express reports the following costs and expenses in June 2017 for its delivery service.
Determine the total amount of (a) delivery service (product) costs and (b) period costs.
Indirect materials$7,100Drivers’ salaries$16,300Depreciation on delivery
equipment11,900Advertising5,500Dispatcher’s salary5,810Delivery equipment
repairs310Property taxes on office building950Office supplies700CEO’s salary12,100Office
utilities1,100Gas and oil for delivery trucks2,700Repairs on office equipment210
Solution
a) Delivery service (product) costs:
b) Period costs:Indirect materials$7,100Depreciation on delivery
equipment$11,900Dispatcher\'s salary$5,810Gas and oil for delivery trucks$2,700Drivers\'
salaries$16,300Delivery equipment repairs $310Total$44,120.
Only 15 of the carbon-14 in a wooden bowl remains. How old is the b.pdffatoryoutlets
Mosquitoes are annoying insects. To eliminate mosquito larvae, a certain granular substance can
be applied to standing water in a ratio of 1 tsp per 30 sq ft of standing water. At this rate, find
how many teaspoons of granules used for 360 sq ft. If 3 tsp = 1 tbsp, how many tablespoons of
be used? a. teaspoons of granules must be used. b. tablespoons of granules must be used.
Solution
To eliminate the mosquito larvae, we need 1 teaspoon for every 30 square-foot of standing water.
For 360 sq ft we need 12 teaspoon s
If 3 teaspoons = 1 tablespoon, then we need 4 tablespoons..
Note Use Java Write a web server that is capable of processing only.pdffatoryoutlets
Many mathematical problems require the addition, subtraction, and multiplication of two
matrices. Write an ADT Matrix. You may use the following class definition. const int
MAX_ROWS = 10; const int MAX_COLS = 10; class MatrixType { public: MatrixType(); void
MakeEmpty(); void SetSize(int rowsSize, int colSize); void StoreItem(int item, int row, int col);
void Add(MatrixType otherOperand, MatrixType& result); void Sub(MatrixType otherOperand,
MatrixType& result); void Mult(MatrixType otherOperand, MatrixType& result); void
Print(ofstream& outfile); bool AddSubCompatible(MatrixType otherOperand); bool
MultCompatible(MatrixType otherOperand); private: int values[MAX_ROWS][MAX_COLS];
int numRows; int numCols; }; Before you start looking at how to implement this class, you must
determine and document the appropriate preconditions and postconditions for each operation.
Note that the class provides the member functions to allow the client to determine if the binary
matrix operations are possible. Before this class can become a permanent part of your program
library, it must be thoroughly tested. Write a menu driven testing program to test your
MatrixType. Test Driver The test driver should handle the following options. (See processing
notes for definition of ). GetNewMatrix Number of rows and number of columns are on the next
line. Values for each row and column AddMatrices Add first and second, leaving the result in the
third SubMatrices Subtract second from first, leaving the result in the third MultiplyMatrices
Multiply first and second, leaving the result in the third PrintMatrix Print the matrix one row per
line on DataOut Quit Processing Notes 1. is a number between 0 and 9. This value is used as an
index into an array of MatrixType. 2. The main function must include a Switch statement where
the case expression is a user-defined enumeration type. This means that the command is
recognized and its enumeration equivalent is sent back to be used in the case statement. 3. The
driver must ensure the preconditions of the member functions of MatrixType. Throw an
exception if an error occurs and continue processing.
Solution
#include
#include
using namespace std;
struct matrixType{
int matDimension;
int matValues[10][10];
};
class MatrixADT{
private:
matrixType resultMatrix;
public:
void intializeResultMatrix(int);
matrixType add(matrixType, matrixType);
matrixType subtract(matrixType,matrixType);
matrixType multiply(matrixType,matrixType);
void printResult();
};
matrixType MatrixADT::add(matrixType M1, matrixType M2){
}
matrixType MatrixADT::subtract(matrixType M1, matrixType M2){
}
matrixType MatrixADT::multiply(matrixType M1, matrixType M2){
}
void MatrixADT::intializeResultMatrix(int dim){
}
int main(){
MatrixADT maX;
matrixType M1, M2;
char op;
int dim;
maX.printResult();
}
void MatrixADT::printResult(){
int i,j;
for (i=0;i
for (j=0; j
cout<.
Negotiations are not usually faster in Deal focused cultures than re.pdffatoryoutlets
Lussier and Achua (2012) propose that it is important to understand individuals\' personalities
when leading. How does the Big Five Model of Personality help a leader lead?
Solution
The big five personality traits are
As Lussier and Achua (2012) proposes the above factors is pertinent for a leader to understand
the personality traits of the team members. If the leader does not understand these traits of the
individual, then the leader needs to practice an autocratic leadership style which exhibits
negativity in the leader. A good leader should work in harmony with the team members and
should not promote any negativism with them. An autocratic leadership style results in high
attrition rate. With the big five model, the leader can depict accurately the patterns of behavior of
individuals over a period of time. The leader also would be able to identify the preferences,
emotional mood and dependability factors based on these five models. These are very important
to lead a team of members because the leader deals with a conflict of individuals and not robots.
For example, the U.S Air force psychologists used the big five model to identify the relationship
between agreeableness and stability. To conclude, the big five model uses strategies to assess,
diagnose and develop the personality of individuals. These factors are imperative for
understanding the individuals to lead the teams effectively to achieve organizational goals..
9. The tort of assault and the tort of battery A) can occur independe.pdffatoryoutlets
9. The tort of assault and the tort of battery A) can occur independently or together 8) require
proof of each of the separate elements of negligence. C) cannot both occur in the same incident
D) are strict liability torts E) are two names for the same tort 9) 10. Assuming that statutory
requirements are met, what is protected under merchant protection statutes? A) Merchants are
protected from product disparagement claims of their competitors. B) Customers are protected
from the negligent conduct of merchants. C) Merchants are protected from false imprisonment
clalms of persons detained on suspicion of shoplifting D) Merchants are protected from the
international torts of their customers E) Merchants are protected from product disparagement
claims of their suppliers What differs in a defamation suit when the plaintiff is a public figure, as
oppo sed to when the plaintiff is not a public figure? 11. A) The plaintiff must prove that the
statement was made with malice. B) The plaintiff can recover even when the statement is a mere
opinion. C) The plaintiff need not prove actual injury to the reputation. D) Punitive damages are
available. E) The plaintiff must prove that the statement was made in writing. 12. Which of the
following is true about the tort of invasion of the right to privacy? Once a fact has become
public, ts disclosure cannot thereafter support a claim for the invasion of the right to privacy. A)
B) The tort requires that the defendant entered the plaintiff\'s home or place of business to
acquire the information that was disclosed C) The tort is actionable only by public figures D)
True statements or facts that are disclosed can support a claim for the invasion of the right to
privacy.
Solution
9. a as they can occur together but also independently, assault is the threat of immediate harm
while battery is the harmful physical contact
10. d
11. a defamation is the publication of a statement which is held false until it is proved
12. d.
In JAVA... I need help on what is asked in the questions that are bolded
For this problem you must define a simple generic interface PairInterface, and two
implementations of the interface, BasicPair and ArrayPair.
Define a Java interface named PairInterface. A class that implements this interface allows
creation of an object that holds a “pair” of objects of a specified type—these are referred to as
the “first” object and the “second” object of the pair. We assume that classes implementing
PairInterface provide constructors that accept as arguments the values of the pair of objects. The
PairInterface interface should require both setters and getters for the first and second objects. The
actual type of the objects in the pair is specified when the PairInterface object is instantiated.
Therefore, both the PairInterface interface and the classes that implement it should be generic.
Suppose a class named BasicPair implements the PairInterfaceinterface. A simple sample
application that uses BasicPair is shown here. Its output would be \"apple orange.\"
Create a class called BasicPair that implements the PairInterface interface. This class should use
two instance variables, first and second, to represent the two objects of the pair. Create a test
driver application that demonstrates that the BasicPair class works correctly.
Create a class called ArrayPair that implements the PairInterface interface. This class should use
an array10 of size 2 to represent the two objects of the pair. Create a test driver application that
demonstrates that the ArrayPair class works correctly.
Solution
package javaapplication5;
/**
*
* @author Rashmi Tiwari
*/
interface PairInterface{
void setFirst(String first);
void setSecond(String second);
String getFirst();
String getSecond();
}
class BasicPair implements PairInterface{
String first;
String second;
BasicPair(String first,String second){
this.first=first;
this.second=second;
}
@Override
public String getFirst() {
return first;
}
@Override
public String getSecond() {
return second;
}
@Override
public void setFirst(Object first ) {
this.first=(String)first;
}
@Override
public void setSecond(Object second) {
this.second=(String)second;
}
}
class ArrayPair implements PairInterface{
String first;
String second;
ArrayPair(String first,String second){
this.first=first;
this.second=second;
}
@Override
public String getFirst() {
return first;
}
@Override
public String getSecond() {
return second;
}
@Override
public void setFirst(Object first ) {
this.first=(String)first;
}
@Override
public void setSecond(Object second) {
this.second=(String)second;
}
}
class DriverApplication {
public static void main(String args[]){
PairInterface myPair =
new BasicPair<>(\"apple\", \"peach\");
System.out.print(myPair.getFirst() + \" \");
myPair.setSecond(\"orange\");
System.out.println(myPair.getSecond());
ArrayPair[] array2=new ArrayPair[2];
array2[0]=new ArrayPair(\"apple\",\"peach\");
System.out.print(array2[0].getFirst()+\" \");
arra.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Normal Labour/ Stages of Labour/ Mechanism of LabourWasim Ak
Normal labor is also termed spontaneous labor, defined as the natural physiological process through which the fetus, placenta, and membranes are expelled from the uterus through the birth canal at term (37 to 42 weeks
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Q1. public void operationZ() throws StackUnderflowException { .pdf
1. Q1. public void operationZ() throws StackUnderflowException
{
if(stackTop == null)
throw new StackUnderflowException();
stackTop = stackTop.link;
}//end operationZ
What does it mean if stackTop equals NULL in the operation above?
a. The stack is full
b. The stack is empty
c. The element does not exist
d. The stack is nonempty but not full
Q2. The bottom element of the stack is the last element added to the stack.
a. true
b. false
Q3. What is the equivalent postfix expression for the infix expression: (x - y) * (v + w)?
a. x v * y w - +
b. - x y + v w *
c. x * y + v * w -
d. x y - v w + *
Q4. The item added to the stack last will be the item removed last.
a. true
b. false
Q5. StackClass s = new StackClass(50);
int x, y, z;
s.push(new IntElement(3));
s.push(new IntElement(7));
x = s.pop();
s.push(new IntElement(5));
y = s.pop();
2. z = s.pop();
Given the sequence of operations above, what is the value of x?
a. 0
b. 3
c. 5
d. 7
Q6. StackClass s = new StackClass(50);
int x, y, z;
s.push(new IntElement(3));
s.push(new IntElement(7));
x = s.pop();
s.push(new IntElement(5));
y = s.pop();
z = s.pop();
Given the sequence of operations above, what is the value of y?
a. 0
b. 3
c. 5
d. 7
Q7. In a linked list implementation of a stack, only a fixed number of elements can be pushed
onto the stack.
a. true
b. false
Q8. In a linked representation, memory for the stack elements is allocated dynamically.
a. true
b. false
Q9. Add and delete are two basic operations of queues.
a. true
b. false
3. Q10. FIFO is similar to the way customers in line at a bank are serviced.
a. true
b. false
Q11. The method front returns the first element in the queue.
a. true
b. false
Q12. A technique in which one system models the behavior of another system is called
simulation.
a. true
b. false
Q13. In a(n) ____ queue, customers or jobs with higher priority are pushed to the front of the
queue.
a. circular
b. priority
c. linked
d. array-based
Q14. Whenever an application is modeled on a FIFO structure, ____ are used.
a. lists
b. queues
c. stacks
d. arrays
Q15. In a priority queue, customers or jobs with higher priority are pushed to the back of the
queue.
a. true
b. false
Q16. Queue can be derived from the class ____.
a. LinkedListClass
b. stack
c. list
4. d. array
Q17. One of the disadvantages of chaining is that if the item size is small, a considerable amount
of space is wasted.
a. true
b. false
Q18. Hashing collision resolution techniques are classified into which of the following
categories?
a. open addressing only
b. chaining only
c. closed addressing only
d. both open addressing and chaining
Q19. One requirement of linear search is that the item must be in the array.
a. true
b. false
Q20. On average, the number of comparisons made by a sequential search is equal to one-third
the size of the list.
a. true
b. false
Q21. In linear search, you search an array starting from the middle component.
a. true
b. false
Q22. In sequential search, the array must be ordered.
a. true
b. false
Q23. If we want to design a search algorithm that is of an order less than log2n, then it ____ be
comparison based.
a. must
b. could
c. cannot
5. d. should
Q24. In chaining, the average number of comparisons for an unsuccessful search is equal to the
load factor.
a. true
b. false
Q25. Both random and quadratic probing eliminate ____.
a. primary clustering
b. secondary clustering
c. rehashing
d. random probing
Q26. Merge sort uses a pivot just like quick sort.
a. true
b. false
Q27. The insertion sort algorithm sorts the list by moving each element to its proper place.
a. true
b. false
Q28. The functions implementing sorting algorithms are included as private members of the
related class.
a. true
b. false
Q29. Merge sort can be implemented for only array based lists.
a. true
b. false
Q30. Insertion sort tries to reduce the number of key comparisons relative to which of the
following?
a. heap sort
b. merge sort
c. selection sort
d. quick sort
6. Q31. The worst case for the number of comparisons in quick sort is O(n2).
a. true
b. false
Q32. Suppose that L is a list of n elements, where n > 0. Let A(n) denote the number of key
comparisons in the average case of merge sort. Which of the following is true?
a. A(n) = O(n log2n)
b. A(n) = O(n log n)
c. A(n) = O(n2 log n)
d. A(n) = O(n2 log2n)
Q33. The selection sort algorithm sorts a list by selecting the smallest element in the (unsorted
portion of the) list, and then moving this smallest element to the ____ of the (unsorted) list.
a. pivot
b. top
c. middle
d. bottom
Q34. Quick sort overcomes the worst case scenario of heap sort.
a. true
b. false
Q35. The iterative preorder tree traversal function is known as ____.
a. nonrecursive preorder traversal
b. recursive preorder traversal
c. preorder traversal
d. nonrecursive postorder traversal
Q36. In a binary search tree, the key in the ____ node is larger than every key in the left subtree
and smaller than every key in the right subtree.
a. child
b. root
c. right
d. head
7. Q37. Any node in a binary tree can be called a leaf node.
a. true
b. false
Q38. There is a unique path from the ____ to every node in the binary tree.
a. branch
b. root
c. reference
d. info
Q39. Each node in a binary tree contains data and a link to the left child and a link to the right
child.
a. true
b. false
Q40. In an AVL tree: 1) the height of the left and right subtrees of the root differ by at most 2,
and 2) the left and right subtrees of the root are AVL trees.
a. true
b. false
Q41. There are ____ cases to consider when deleting a node from a binary search tree.
a. two
b. three
c. four
d. five
Q42. In an preorder traversal, the binary tree is traversed as follows: 1) Traverse the left subtree,
2) Visit the node, and 3) Traverse the right subtree.
a. true
b. false
Q43. The adjacency matrix AG is a two-dimensional n x n matrix such that the (i, j)the entry of
AG is 1 if there is an edge from vi to vj; otherwise, the (i, j)the entry is zero.
a. true
b. false
8. Q44. The ____-first traversal of a graph is similar to traversing a binary tree level by level.
a. height
b. depth
c. breadth
d. width
Q45. In an undirected graph G = (V, E), the elements of E are ordered pairs.
a. true
b. false
Q46. A tree T is called a ____ tree of graph G if T is a subgraph of G such that V(T ) = V(G),
that is, all the vertices of G are in T.
a. spanning
b. binary
c. binary search
d. short
Q47. The edges connecting two vertices can be assigned a nonnegative real number, called the
____ of the edge.
a. height
b. weight
c. depth
d. level
Q48. A graph G has a spanning tree if and only if G is disconnected.
a. true
b. false
Q49. The two most common graph traversal algorithms are the height first traversal and breadth
first traversal.
a. true
b. false
Q50. The depth first traversal is similar to the postorder traversal of a binary tree.
a. true
b. falseQ1. public void operationZ() throws StackUnderflowException
9. {
if(stackTop == null)
throw new StackUnderflowException();
stackTop = stackTop.link;
}//end operationZ
What does it mean if stackTop equals NULL in the operation above?
a. The stack is full
b. The stack is empty
c. The element does not exist
d. The stack is nonempty but not full
Q2. The bottom element of the stack is the last element added to the stack.
a. true
b. false
Q3. What is the equivalent postfix expression for the infix expression: (x - y) * (v + w)?
a. x v * y w - +
b. - x y + v w *
c. x * y + v * w -
d. x y - v w + *
Q4. The item added to the stack last will be the item removed last.
a. true
b. false
Q5. StackClass s = new StackClass(50);
int x, y, z;
s.push(new IntElement(3));
s.push(new IntElement(7));
x = s.pop();
s.push(new IntElement(5));
y = s.pop();
z = s.pop();
10. Given the sequence of operations above, what is the value of x?
a. 0
b. 3
c. 5
d. 7
Q6. StackClass s = new StackClass(50);
int x, y, z;
s.push(new IntElement(3));
s.push(new IntElement(7));
x = s.pop();
s.push(new IntElement(5));
y = s.pop();
z = s.pop();
Given the sequence of operations above, what is the value of y?
a. 0
b. 3
c. 5
d. 7
Q7. In a linked list implementation of a stack, only a fixed number of elements can be pushed
onto the stack.
a. true
b. false
Q8. In a linked representation, memory for the stack elements is allocated dynamically.
a. true
b. false
Q9. Add and delete are two basic operations of queues.
a. true
b. false
Q10. FIFO is similar to the way customers in line at a bank are serviced.
11. a. true
b. false
Q11. The method front returns the first element in the queue.
a. true
b. false
Q12. A technique in which one system models the behavior of another system is called
simulation.
a. true
b. false
Q13. In a(n) ____ queue, customers or jobs with higher priority are pushed to the front of the
queue.
a. circular
b. priority
c. linked
d. array-based
Q14. Whenever an application is modeled on a FIFO structure, ____ are used.
a. lists
b. queues
c. stacks
d. arrays
Q15. In a priority queue, customers or jobs with higher priority are pushed to the back of the
queue.
a. true
b. false
Q16. Queue can be derived from the class ____.
a. LinkedListClass
b. stack
c. list
d. array
12. Q17. One of the disadvantages of chaining is that if the item size is small, a considerable amount
of space is wasted.
a. true
b. false
Q18. Hashing collision resolution techniques are classified into which of the following
categories?
a. open addressing only
b. chaining only
c. closed addressing only
d. both open addressing and chaining
Q19. One requirement of linear search is that the item must be in the array.
a. true
b. false
Q20. On average, the number of comparisons made by a sequential search is equal to one-third
the size of the list.
a. true
b. false
Q21. In linear search, you search an array starting from the middle component.
a. true
b. false
Q22. In sequential search, the array must be ordered.
a. true
b. false
Q23. If we want to design a search algorithm that is of an order less than log2n, then it ____ be
comparison based.
a. must
b. could
c. cannot
d. should
13. Q24. In chaining, the average number of comparisons for an unsuccessful search is equal to the
load factor.
a. true
b. false
Q25. Both random and quadratic probing eliminate ____.
a. primary clustering
b. secondary clustering
c. rehashing
d. random probing
Q26. Merge sort uses a pivot just like quick sort.
a. true
b. false
Q27. The insertion sort algorithm sorts the list by moving each element to its proper place.
a. true
b. false
Q28. The functions implementing sorting algorithms are included as private members of the
related class.
a. true
b. false
Q29. Merge sort can be implemented for only array based lists.
a. true
b. false
Q30. Insertion sort tries to reduce the number of key comparisons relative to which of the
following?
a. heap sort
b. merge sort
c. selection sort
d. quick sort
Q31. The worst case for the number of comparisons in quick sort is O(n2).
14. a. true
b. false
Q32. Suppose that L is a list of n elements, where n > 0. Let A(n) denote the number of key
comparisons in the average case of merge sort. Which of the following is true?
a. A(n) = O(n log2n)
b. A(n) = O(n log n)
c. A(n) = O(n2 log n)
d. A(n) = O(n2 log2n)
Q33. The selection sort algorithm sorts a list by selecting the smallest element in the (unsorted
portion of the) list, and then moving this smallest element to the ____ of the (unsorted) list.
a. pivot
b. top
c. middle
d. bottom
Q34. Quick sort overcomes the worst case scenario of heap sort.
a. true
b. false
Q35. The iterative preorder tree traversal function is known as ____.
a. nonrecursive preorder traversal
b. recursive preorder traversal
c. preorder traversal
d. nonrecursive postorder traversal
Q36. In a binary search tree, the key in the ____ node is larger than every key in the left subtree
and smaller than every key in the right subtree.
a. child
b. root
c. right
d. head
Q37. Any node in a binary tree can be called a leaf node.
a. true
15. b. false
Q38. There is a unique path from the ____ to every node in the binary tree.
a. branch
b. root
c. reference
d. info
Q39. Each node in a binary tree contains data and a link to the left child and a link to the right
child.
a. true
b. false
Q40. In an AVL tree: 1) the height of the left and right subtrees of the root differ by at most 2,
and 2) the left and right subtrees of the root are AVL trees.
a. true
b. false
Q41. There are ____ cases to consider when deleting a node from a binary search tree.
a. two
b. three
c. four
d. five
Q42. In an preorder traversal, the binary tree is traversed as follows: 1) Traverse the left subtree,
2) Visit the node, and 3) Traverse the right subtree.
a. true
b. false
Q43. The adjacency matrix AG is a two-dimensional n x n matrix such that the (i, j)the entry of
AG is 1 if there is an edge from vi to vj; otherwise, the (i, j)the entry is zero.
a. true
b. false
Q44. The ____-first traversal of a graph is similar to traversing a binary tree level by level.
a. height
16. b. depth
c. breadth
d. width
Q45. In an undirected graph G = (V, E), the elements of E are ordered pairs.
a. true
b. false
Q46. A tree T is called a ____ tree of graph G if T is a subgraph of G such that V(T ) = V(G),
that is, all the vertices of G are in T.
a. spanning
b. binary
c. binary search
d. short
Q47. The edges connecting two vertices can be assigned a nonnegative real number, called the
____ of the edge.
a. height
b. weight
c. depth
d. level
Q48. A graph G has a spanning tree if and only if G is disconnected.
a. true
b. false
Q49. The two most common graph traversal algorithms are the height first traversal and breadth
first traversal.
a. true
b. false
Q50. The depth first traversal is similar to the postorder traversal of a binary tree.
a. true
b. false
Solution
17. Ans for Question 1
-> StackTop always point to the top element of the stack. So if it is null, then there is no element
in the stack.The stack is empty (option b)
Ans for Question 2
-> No, Stack is a LIFO property (Last In First Out). So bottom element is the first element added
to the stack ( Option b)
Ans for Question 3
-> The postfix expression will be x y - v w + * ( Option d)
Ans for Question 4
-> No, As for the FIFO property, The item added to the stack last will be the item removed
first.So it is false ( Option b)
Ans for Question 5
-> After push 3 and 7, The stack will be [ 3 7 ] and the top points to 7. When it perform pop()
then the top element will be popped( here 7 ). After this, the stack will be [ 3 ]. Now again is
push 5. So the stack will be [ 3 7 ]. Then y=s.pop(); y=7; So value of y=7. (option d)
Ans for Question 6
-> When we push 3 and 7 in the stack named s, the stack looks like [ 3 7 ] and top points to 7.
Now x=s.pop(). so x = 7 and stack look like [ 3 ]. Now again we insert 5. So, now it looks like [
3 5 ] and top = 5. Now y=s.pop(). so it returns the top element that is 5. So y=5.(Option c)
Ans for Question 7
-> That depends on how to implement it. We can make it both fixed size and variable no. But in
general, as link list is used, so it is variable size. So it is false( Option 7)
Ans for Question 8
-> True.memory allocation of the list is dynamical.
Ans for Question 9
-> No, There is no add delete operation, There is ENQUEUE and DEQUEUE operation.
ENQUEUE for insert element in Queue and DEQUEUE for remove element.(Option b)
Ans for Question 10
-> Yes,FIFO mean first in first out. That's in mountain in bank ( Option a)
Ans for Question 11
-> Yes, Front returns the first inserted element of the Queue.(Option a)