Question

In: Computer Science

Which one ore more of the following statements is/are true of Java? a.LinkedList < T >...

  1. Which one ore more of the following statements is/are true of Java?

a.LinkedList < T > and ArrayList < T > are interfaces
b.List < T > is a concrete class
c.LinkedList < T > and ArrayList< T > are concrete classes
d.List < T > is an interface

  1. Suppose we run these operations on a queue of characters:

enqueue 'a'

enqueue 'b'

enqueue 'c'

dequeue

dequeue

What remains in the queue after these operations complete?

a. 'a'
b. 'a', 'b'
c. 'b', 'c'
d. 'c'

  1. Suppose we run this series of operations on a stack of characters:

push 'a'

push 'b'

pop

peek

push 'c'

pop

What value(s) is/are on the stack after these operations are complete?

a. 'a', 'b', 'c'
b. 'a', 'b'
c. 'c'
d. 'a'

  1. Which of the following lists is *not* ordered from least-expensive complexity to most-expensive complexity?

a. O(1), O(log n), O(n), O(n ^ 2)
b. O(n log n), O(n), O(1), O(log n)
c. O(log n), O(n), O(n log n), O(n ^ 2)
d. O(l), O(n), O(n ^ 2), O(n ^ 3)

  1. Which statement is false?

a. binary search of a sorted array is O(log n)
b. linear search of an array is O(n)
c. traversing a linked list is O(n)
d. adding an element to the end of an arraylist that has available space is O(n)

Solutions

Expert Solution


Related Solutions

Which of the following statements are true? There may be more than one true statement. A....
Which of the following statements are true? There may be more than one true statement. A. Any linear combination of vectors can always be written in the form Ax for a suitable matrix A and vector x. B. Every matrix equation Ax=b corresponds to a vector equation with the same solution set. C. If the echelon form of the augmented matrix [A | b][A | b] has a leading entry in every row, then the equation Ax=b is inconsistent. D....
Which of the following statements is true? Note that more than one of the statements may...
Which of the following statements is true? Note that more than one of the statements may be true. a. Every relation that is in 3NF is in 2NF. b. A relation that is in 2NF, and that has a non-primary-key attribute that is functionally dependent on another non-primary-key attribute is not in 3NF. c. A relation that is in 2NF, and that has a non-primary-key attribute that is transitively functionally dependent on the primary key is not in 3NF. Which...
A) Which of the following statements are true? Note that there may be more than one...
A) Which of the following statements are true? Note that there may be more than one correct answer; select all that are true. As the p-value increases, the evidence against the null hypothesis also increases. In hypothesis testing, if the p-value is sufficiently small, then the null hypothesis can be rejected in favour of the alternate hypothesis. If the null hypothesis is true, then the p-value will always be greater than 0.1. If the null hypothesis is false, then the...
Which of the following statements are TRUE? Note that there may be more than one correct...
Which of the following statements are TRUE? Note that there may be more than one correct answer; select all that are true. There are countably infinite values of X in a continuous uniform distribution. For a continuous uniform distribution defined on the interval [a,b], P(X < a) and P(X > b) is undefined. The mean and the variance of a continuous uniform random variable are the same. In a continuous uniform distribution, the mean and the median are the same....
Which of the following statements are true (T) and which are false (F)? a. In the...
Which of the following statements are true (T) and which are false (F)? a. In the Fisher’s exact test we test the following hypotheses: H0: the proportions of type A and type B discordant pairs are the same (pA=pB). H1: the proportions of type A and type B discordant pairs are not the same (pA≠pB). b. Using the McNemar’s test to analyze matched-pair data (paired samples) is a correct decision. c. The Fisher’s exact test is based on a 2x2...
1. Which of the following statements are true? Select all that apply. Select one or more:...
1. Which of the following statements are true? Select all that apply. Select one or more: a. Earnings per share is calculated by dividing retained earnings by the number of shares of common stock outstanding. b. The creditors of a firm must be satisfied before any earnings can be distributed to the common shareholders. c. When referring to ratio comparisons, time-series analysis compares a firm to that of an industry leader. d. The operating profit margin must take into account...
Which of the following statements are true Select one: a. Indigenous Australians are 1.7 times more...
Which of the following statements are true Select one: a. Indigenous Australians are 1.7 times more likely than non-indigenous Australians to have a disability b. When indigenous people have heart attacks they are more than twice as likely to die from the heart attacks as a non-indigenous counterparts c. When indigenous people are admitted to hospital following a heart attack there is a 40% lower rate of being investigated by angiographic coronary angioplasty or stent procedures d. The research shows...
Which of the following statements regarding dissociation is true:(might be more than one answer) - is...
Which of the following statements regarding dissociation is true:(might be more than one answer) - is always symptomatic of a dissociative disorder - dissociation can be a symptom of a stress-related disorder - most often affects semantic memory - dissociation often occurs during a traumatic event
Which of the following statements regarding flagella are true? Select one or more: a. Some microbes...
Which of the following statements regarding flagella are true? Select one or more: a. Some microbes contain internal flagella b. Some microbes contain external flagella c. All flagella spin in a circular fashion d. Some microbes contain perpendicular flagella e. Bacterial flagella consist of multiple parts
Read the following 5 statements and decide which of them are TRUE: Select one or more:...
Read the following 5 statements and decide which of them are TRUE: Select one or more: a. An asset is preferred by investors, if it has a higher return compared to another asset, even if the risk is also higher. b. The covariance as well as correlation measure the statistical relationship between two variables and are both symmetric. c. The contribution of an individual asset to the expected return of a portfolio is purely given by the expected return of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT