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
Vanyuwa [196]
3 years ago
14

How do you do these two questions? The first might have multiple answers and the second will have only one answer.

Computers and Technology
1 answer:
Svetlanka [38]3 years ago
6 0

Answer:

1. Generally Linkedlist is used, but you can also use the queue. Hence both linked list are queue are correct options. However, treeset is sorted and hashset is not sorted, and hence we cannot make use of the treeset. Similarly the stack cannot as well be used as a Hashset.

2. D. Additional cells in the same hashset are examined and the index is incremented by a fixed value each time.

Explanation:

The 2 deals with the linear probing, and what is meant as option in 2 is what we know as linear probing in hashset, and we do have quadratic probing and double probing as well.

You might be interested in
If a node has a wireless connection to the internet, does that node have to be mobile
Marizza181 [45]
No it does not . answers
8 0
3 years ago
If somebody is using a laptop at a coffee shop, how are they likely connected to a network?
marusya05 [52]

Answer:

by signing into the wifi network they have

Explanation:

4 0
3 years ago
There are three types of operators in BASIC-256 <br>a) True b) False​
Anestetic [448]

Answer:

a)True is the answer......

6 0
3 years ago
The running time of Algorithm A is (1/4) n2+ 1300, and the running time of another Algorithm B for solving the same problem is 1
Mnenie [13.5K]

Answer:

Answer is explained below

Explanation:

The running time is measured in terms of complexity classes generally expressed in an upper bound notation called the big-Oh ( "O" ) notation. We need to find the upper bound to the running time of both the algorithms and then we may compare the worst case complexities, it is also important to note that the complexity analysis holds true (and valid) for large input sizes, so, for inputs with smaller sizes, an algorithm with higher complexity class may outperform the one with lower complexity class i.e, efficiency of an algorithm may vary in cases where input sizes are smaller & more efficient algorithm might be outperformed by the lesser efficient algorithms in those cases.

That's the reason why we consider inputs of larger sizes when comparing the complexity classes of the respective algorithms under consideration.

Now coming to our question for algorithm A, we have,

let F(n) = 1/4x² + 1300

So, we can tell the upper bound to the function O(F(x)) = g(x) = x2

Also for algorithm B, we have,

let F(x) = 112x - 8

So, we can tell the upper bound to the function O(F(x)) = g(x) = x

Clearly, algorithmic complexity of algorithm A > algorithmic complexity of algorithm B

Hence we can say that for sufficiently large inputs , algorithm B will be a better choice.

Now to find the exact location of the graph in which algorithmic complexity for algorithm B becomes lesser than

algorithm A.

We need to find the intersection point of the given two equations by solving them:

We have the 2 equations as follows:

y = F(x) = 1/4x² + 1300 __(1)

y = F(X) = 112x - 8 __(2)

Let's put the value of from (2) in (1)

=> 112x - 8 = 1/4x² + 1300

=> 112x - 0.25x² = 1308

=> 0.25x² - 112x + 1308 = 0

Solving, we have

=> x = (112 ± 106) / 0.5

=> x = 436, 12

We can obtain the value for y by putting x in any of the equation:

At x=12 , y= 1336

At x = 436 , y = 48824

So we have two intersections at point (12,1336) & (436, 48824)

So before first intersection, the

Function F(x) = 112x - 8 takes lower value before x=12

& F(x) = 1/4x² + 1300 takes lower value between (12, 436)

& F(x) = 112x - 8 again takes lower value after (436,∞)

Hence,

We should choose Algorithm B for input sizes lesser than 12

& Algorithm A for input sizes between (12,436)

& Algorithm B for input sizes greater than (436,∞)

8 0
3 years ago
In Java please,
Bogdan [553]

Answer:

  1. import java.util.Scanner;
  2. public class Main {
  3.    public static void main(String[] args) {
  4.        Scanner input = new Scanner(System.in);
  5.        System.out.print("Enter meal total: $");
  6.        double meal = input.nextDouble();
  7.        double finalAmount = meal + meal *0.09;
  8.        if(finalAmount * 0.15 > 8){
  9.            finalAmount = finalAmount + 8;
  10.        }else{
  11.            finalAmount = finalAmount + finalAmount * 0.15;
  12.        }
  13.        System.out.println("Final amount: $" + finalAmount);
  14.    }
  15. }

Explanation:

Firstly, create a Scanner object and print user to input total meal (Line 5-7). Next, add the 9% tax to the meal total (Line 8). Use an if statement to check if the finalAmount multiplied by the 15% of tips is bigger than 8 (Line 10), if so, only add 8 to the final amount (Line 11). If not, add 15% tips to final amount (Line 12). At last, print out the final amount (Line 15).

8 0
3 years ago
Other questions:
  • Explain the concept of risk management, including risk identification, assessment, and control.
    5·1 answer
  • Describe how computer is in the last 35 years
    6·1 answer
  • Which of the following correctly orders the investments from LOWER risk to HIGHER risk?
    7·2 answers
  • A store trying to analyze the behavior of its customers will often maintaina two-dimensional array A, where the rows correspond
    6·1 answer
  • What is company NDR?​
    11·1 answer
  • What is software and explain the five types of software
    5·2 answers
  • In Java:
    15·1 answer
  • What happens when text is added to grouped objects that is larger than an object ?
    9·2 answers
  • For this activity, you will practice being both proactive and reactive to bugs. Both are necessary to get rid of errors in code.
    5·1 answer
  • What is the best description of a programming language?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!