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
amm1812
4 years ago
15

Time complexity of merge sort

Engineering
1 answer:
vovangra [49]4 years ago
6 0

Answer:

The correct answer is "O (n\times Log n)". A further explanation is given below.

Explanation:

  • Throughout all the three instances (worst, average as well as best), the time complexity including its Merge sort seems to be O (n\times Log n) as the merge form often splits the array into two halves together tends to linear time to combine multiple halves.
  • As an unsorted array, it needs an equivalent amount of unnecessary capacity. Therefore, large unsorted arrays are not appropriate for having to search.
You might be interested in
Rewrite the following nested if-else statement as a switch statement that accomplishes exactly the same thing. Assume that num i
seropon [69]

Answer:

Answer explained below

Explanation:

The following is the nested if-else statement:

% if-based statement

if num < -2 ||  num > 4

          f1(num)

else

     if num <=2

          if num >= 0

              f2(num)

          else

              f3(num)

          end

     else

          f4(num)

     end

end

<u>NOTE:</u> the num is an integer variable that has been initialized and that there are functions f1, f2, f3 and f4.

   

The nested if-else statement can be replaced by switch statement as shown below:

switch num

    case(0, 1, 2)

         f2(num)

    case(-2, -1)

         f3(num)

    case(3, 4)

         f4(num)

    otherwise

         f1(num)

In this case, the switch based code is easier to write and understand because the cases are single valued or a few discrete values (not ranges of values)

8 0
3 years ago
Which of the following approaches to lean engineering consists of teams of people from different departments sharing
AURORKA [14]

Answer:

PDSA, where you work as a group

Explanation:

8 0
3 years ago
Consider a very long rectangular fin attached to a flat surface such that the temperature at the end of the fin is essentially t
kodGreya [7K]

Answer:

\frac{T-20}{130-20}= e^{-14.28*0.05}

And if we solve for T we got:

T= 20 + 110e^{-14.28*0.05} = 73.86 C

The answer for this case would be T = 73.86 C at 5cm from the base of the fin.

Explanation:

Data given

For this case we have the following data given:

h = 20 \frac{W}{m^2 K} represent the heat transfer coefficient.

p represent the perimeter for this case and would be given by:

p = 2*0.05m +2*0.001m= 0.102m

k = 200 \frac{W}{m C} represent the thermal conductivity

w = 5cm =0.05 m represent the width

h = 1mm =0.001m represent the thickness

A= wh= 0.05m *0.001m = 0.00005 m^2

Solution to the problem

For this case we assume that we have steady conditions, the temperature of the fins varies just in one direction, the heat transfer coefficient not changes with the time and the thermal properties of the fin not change.

We can determine the temperature if the fin at x=5 cm=0.05 m from the base with the following formula:

\frac{T-T_{\infty}}{T_b -T_{\infty}} = e^{-mx}

Where m is a coefficient given by:

m = \sqrt{\frac{hp}{kA}}=\sqrt{\frac{20 W/m^2 C 0.102 m}{200 W/ mC 0.00005 m^2}}= 14.28 m^{-1}

The value of x for this case represent the distance x =5 cm =0.05m

T_b =130 C represent the base temperature

T_{\infty}= 20 represent the temperature of the sorroundings or the ambient.

If we replace we have this:

\frac{T-20}{130-20}= e^{-14.28*0.05}

And if we solve for T we got:

T= 20 + 110e^{-14.28*0.05} = 73.86 C

The answer for this case would be T = 73.86 C at 5cm from the base of the fin.

3 0
3 years ago
Select the correct answer. Why should engineers keep themselves updated on the technological developments in their field? OA. to
Nataly_w [17]
OD is the correct answer
5 0
3 years ago
Write a program to input 6 numbers. After each number is input, print the biggest of the numbers entered so far.
likoan [24]

Answer:

P<u>rogram:</u>

# Enter Numbers #

number1 = int(input("Enter number: " ))

print("Largest: " + string(number1))

#for num 2 #

number2 = int(input("Enter a number: "))

if number2 > number1:

 print("Largest: " + string(number2))

else:

 print("Largest: " + string(num1))

#for num 3 #

number3 = int(input("Enter a number: "))

print("Largest: " + string(max(number1, number2, number3)))  

#for num 4 #

number4 = int(input("Enter a number: "))

print("Largest: " + string(max(number1, number2, number3, number4)))

#for num 5 #

number5 = int(input("Enter a number: "))

print("Largest: " + string(max(number1, number2, number3, number4, number5)))

#for num 6 #

number6 = int(input("Enter a number: "))

print("Largest: " + string(max(number1, number2, number3, number4, number5, number6)))        

# END #

4 0
3 years ago
Other questions:
  • Diborane is used in silicon chip manufacture. One facility uses a 500-lb bottle. If the entire bottle is released continuously d
    8·1 answer
  • When its 100-hp engine is generating full power, a small airplane with mass 700 kggains altitude at a rate of 2.5 m/s. What frac
    6·1 answer
  • A hot plate with a temperature of 60 C, 50 triangular profile needle wings of length (54 mm), diameter 10 mm (k = 204W / mK) wil
    6·1 answer
  • Diana and Kinsey are put in charge of choosing a mascot for their basketball team. There are fifteen players on the team, but Di
    12·1 answer
  • A resource has value, and people are willing to pay for it most likely because the resource is
    9·2 answers
  • Why should females not be concerned about developing manly muscles? <br><br> Please help
    7·1 answer
  • Implement the following Matlab code:
    8·1 answer
  • Please help fast
    13·1 answer
  • 10 tasks and 5 exercises. How many ways are there to build the test?
    14·1 answer
  • error: request for member 'setcursor' in 'oled', which is of non-class type 'adafruit ssd1306(int, int)' oled.setcursor(x, accel
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!