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
fomenos
2 years ago
12

We can sort a given set of n numbers by first building a binary search tree containing these numbers (using Tree-Insert repeated

ly to insert the numbers one by one) and then printing the numbers by an inorder tree walk. What are the worst-case and best-case running times for this sorting algorithm?

Computers and Technology
1 answer:
OLga [1]2 years ago
5 0

Worst case for binary search tree -O(n)

Best case for binary search tree -O(1)

<u>Explanation:</u>

The Binary search tree is the special type of binary tree. There are two child node

  1. Left child node
  2. Right child node  
  • In that, the right child node has a value greater than it’s the parent node. The left child node has value less than it’s the parent node.
  • In the below fig. for inserting element 0, it must be inserted as the left child of 1. Therefore, for sorting we have traveled in reverse order from (3,2,1) this is the worst-case complexity O(n).

You might be interested in
The purpose of a good web page design is to make it
meriva

Answer:

Hi , so your answer is that a good web page design is to make it easy to use and meaningful and able to help people .

Explanation:

Really hope i helped , have a nice day :)

5 0
3 years ago
Read 2 more answers
Write a loop that reads strings from standard input where the string is either "land", "air", or "water". The loop terminates wh
____ [38]

Answer:

count_land = count_air = count_water = 0

while True:

   s = input("Enter a string: ")

   if s == "xxxxx":

       break

   else:

       if s == "land":

           count_land += 1

       elif s == "air":

           count_air += 1

       elif s == "water":

           count_water += 1

print("land: " + str(count_land))

print("air: " + str(count_air))

print("water: " + str(count_water))

Explanation:

*The code is in Python

Initialize the variables

Create a while loop that iterates until a specific condition is met. Inside the loop, ask the user to enter the string. If it is "xxxxx", stop the loop. Otherwise, check if it is "land", "air", or "water". If it is one of the given strings, increment its counter by 1

When the loop is done, print the number of strings entered in the required format

4 0
3 years ago
What is responsible for what u see on a computer monitor?
zhuklara [117]
What is responsible or who is responsible?
3 0
3 years ago
Your company requires computers to authenticate to one another and enforces this requirement with Windows Defender Firewall with
lubasha [3.4K]

There are a lot of rules in computing. The above can be done with authentication exemption.

<h3>What is Authentication exemptions?</h3>

This is a method that helps one to be able to specify a particular group of computers.

Conclusively, This can be done via their Active Directory computer account name or the use of their IP address. Tis does not apply to existing connection security rules.

Learn more about   authentication exemption from

brainly.com/question/25739714

7 0
2 years ago
Which of the following is an example of how the healthcare industry uses computer programming? (5 points)
IgorC [24]
3-D prosthetics would most likely be the answer, also, don’t copy links it’s most likely not the answer anyways.
5 0
2 years ago
Other questions:
  • What is the part of the computer system that receives inputs, directs those inputs to the processor, and redirects the processed
    14·1 answer
  • What task did the u.s. government undertake that many people identify as the birth of the internet
    5·2 answers
  • In order to consolidate your theoretical knowledge into technique and skills with practical and applicational value, you will us
    8·1 answer
  • The seven basic parts of a computer are
    10·2 answers
  • Which guideline should you follow when selecting the font for a presentation
    9·1 answer
  • I had tried to turn on Linux on the Chromebook but it's not working
    11·2 answers
  • How do I get the bot token for discord? (scripting etc)
    5·1 answer
  • An operating system that allows a single user to work on two or more programs at the same time is what type of OS?
    14·1 answer
  • What are the total number of rows and columns on a worksheet?.
    5·2 answers
  • A. Modify the FitnessTracker class that includes data fields for a fitness activity, the number of minutes spent participating,
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!