1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Natasha_Volkova [10]
4 years ago
12

The ________________ operation is required by the Iterable interface.

Computers and Technology
1 answer:
masya89 [10]4 years ago
3 0

Answer:

For question one, the first line  It is Iteration, The second line is Comparator, the third line is none of these is correct.

Question two, the index based method  for (a) is O(1) (b) O(1) (c) O(N) (d) O(N)

Explanation:

<em>Solution to the question</em>

Question 1:

The Iteration operation is required by the Iterable interface.

n application can indicate a specific way to order the elements of a SortedABList list by passing a(n) Comparator so that we can customize the sorting object to a constructor of the list class.

Suppose a list names contains 8 elements. A call to names.add(0, "Albert") results in:  (e) None of these is correct

Question 2:

let us assume that the LBList is built on top of a Linked List and the ABList is built on top of an array:

(a) the add method index based  is O(1) in the average case  and  the O(N) in the worst case

(b) The Index based set operation is O(1) since we can simply move to any index of an array of time constant.

(c) It is O(N) since index Of method needs to look for  the whole array (based on worst case  or average) to get the index

(d)  It is O(N) since index Of method needs to find the whole linked list (on worst case or average ) to search  the index.

You might be interested in
Which of the following is document content that displays at the top of every page?
Vlad1618 [11]

Answer: Header/Title

Explanation:

4 0
3 years ago
Can someone please tell me what I’m doing wrong ? Please and it’s due on Thursday!!
liberstina [14]

Answer:

Sure. In Unit test 5, it's looking for 1 instead of 0. You are returning 0 instead of 1.

0 requires 1 digit to express it and should therefore return 1.

In line 6, change the 0 to a 1.

8 0
2 years ago
Most companies compute the materials price variance when raw materials are _______. received from suppliers and transported to r
Ksju [112]

Answer:

Purchased.

Explanation:

when purchased materials are received from suppliers and transported to raw materials inventory rather than waiting to compute the price variance when the materials are withdrawn from raw materials inventory and used in production.  Also, computing the price variance when the materials are purchased allows materials to be carried in the inventory accounts at their standard cost.

4 0
3 years ago
My friend Leo wants to have an emergency plan for his final exams on University of Southern Algorithmville. He has N subjects to
leonid [27]

Answer:

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. Greedy algorithms are used for optimization problems. An optimization problem can be solved using Greedy if the problem has the following property: At every step, we can make a choice that looks best at the moment, and we get the optimal solution of the complete problem.

If a Greedy Algorithm can solve a problem, then it generally becomes the best method to solve that problem as the Greedy algorithms are in general more efficient than other techniques like Dynamic Programming. But Greedy algorithms cannot always be applied. For example, the Fractional Knapsack problem (See this) can be solved using Greedy, but 0-1 Knapsack cannot be solved using Greedy.

The following are some standard algorithms that are Greedy algorithms.

1) Kruskal’s Minimum Spanning Tree (MST): In Kruskal’s algorithm, we create an MST by picking edges one by one. The Greedy Choice is to pick the smallest weight edge that doesn’t cause a cycle in the MST constructed so far.

2) Prim’s Minimum Spanning Tree: In Prim’s algorithm also, we create an MST by picking edges one by one. We maintain two sets: a set of the vertices already included in MST and the set of the vertices not yet included. The Greedy Choice is to pick the smallest weight edge that connects the two sets.

3) Dijkstra’s Shortest Path: Dijkstra’s algorithm is very similar to Prim’s algorithm. The shortest-path tree is built up, edge by edge. We maintain two sets: a set of the vertices already included in the tree and the set of the vertices not yet included. The Greedy Choice is to pick the edge that connects the two sets and is on the smallest weight path from source to the set that contains not yet included vertices.

4) Huffman Coding: Huffman Coding is a loss-less compression technique. It assigns variable-length bit codes to different characters. The Greedy Choice is to assign the least bit length code to the most frequent character. The greedy algorithms are sometimes also used to get an approximation for Hard optimization problems. For example, the Traveling Salesman Problem is an NP-Hard problem. A Greedy choice for this problem is to pick the nearest unvisited city from the current city at every step. These solutions don’t always produce the best optimal solution but can be used to get an approximately optimal solution.

6 0
3 years ago
So, I am homeschooled, and I want to watch videos on my school account because I might be waiting for like emails from my teache
Jobisdone [24]

what web browser

if firefox go to addons and see if you can turn off mkaffee or something like that

or go incogneto

plese give me branliest good luck

3 0
3 years ago
Read 2 more answers
Other questions:
  • In JAVA, answer the following:
    15·1 answer
  • Bryan knows that it takes him fifteen minutes to drive to work, or twenty minutes if every traffic light is red on the way there
    14·2 answers
  • The Freemont Automobile Factory has discovered that the longer a worker has been on the job, the more parts the worker can produ
    11·1 answer
  • When the word “computer” was coined, what did it mean?
    12·1 answer
  • Which of the following techniques has to do with how the people who make the commercial manipulate the way it looks?
    8·1 answer
  • What are two parts of a cell reference?
    7·1 answer
  • Write, compile and test (show your test runs!) program that calculates and returns the fourth root of the number 81, which is 3.
    11·1 answer
  • What happens if the cursor is in the last cell in a table and you press Tab?
    10·1 answer
  • Why do i have to wait and watch videos
    11·1 answer
  • Accessing disk is much slower than accessing memory. As a result, many file systems have been designed with various optimization
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!