subject
Computers and Technology, 22.08.2020 21:01 bloop3r

For our ArrayList based implementation of a map, the contains operation exhibits O(N) order of growth efficiency (where N is the number of elements in the map). public boolean contains(K k)
// Returns true if an entry in this map with key k exists;
// Returns false otherwise.
{
if (k == null)
throw new IllegalArgumentException("Maps do not allow null keys.");
for (MapEntry temp: map)
if (temp. getKey().equals(k))
return true; // k found, exits method
// No entry is associated with k.
return false;
}
a. false
b .true
2. Retrieval of an element from a list is based on using:
[A] the equals method.
[B] the == operator.
[C] aliases.
[D] all attributes being equal.
[E] All of these are correct.
3. Suppose g has been declared to be of type WeightedGraphInterface and instantiated as an object of a class that implements that interface. Assume that g consists of seven vertices A, B, C, D, E, F, G and seven directed edges A-B, B-C, C-D, D-C, D-F, F-B, and G-E with all weights equal to 5. Show the expected output of the section of code below. Assume that capital letters A through G are of type T (the vertex type), that getToVertices returns a queue with the vertices in alphabetical order, that getUnmarked returns unmarked vertices in alphabetical order, that the null edge value is 0, and that printing a vertex displays its corresponding letter.
System. out. println(g. weightIs(A, B) + g. weightIs(B, A) );
a. 5
b. 1
c. 10
d. Exception

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
Jenny wants to create an animated short video to add to her website. which software will she use to create this animated video?
Answers: 1
question
Computers and Technology, 25.06.2019 14:30
How can i cancel my subscription in
Answers: 1
You know the right answer?
For our ArrayList based implementation of a map, the contains operation exhibits O(N) order of growt...
Questions
question
Medicine, 11.11.2020 14:00
question
Mathematics, 11.11.2020 14:00
question
English, 11.11.2020 14:00
question
Chemistry, 11.11.2020 14:00
question
Engineering, 11.11.2020 14:00
Questions on the website: 13722363