Suppose that the following elements are added in the specified order to an empty binary search tree: Kirk, Spock, Scotty, McCoy, Chekov, Uhuru, Sulu, Khaaaan! Write the elements of the tree above in the order they would be seen by a pre-order, in-order, and post-order traversal. Type your solutions with the elements separated by spaces and/or commas, such as:

Answers

Answer 1

Answer:

Pre-order: Kirk, Chekov, Khaaaan, Spock, Scotty, McCoy, Sulu, Uhuru

In-order: Chekov, Khaaaan, Kirk, McCoy, Scotty, Spock, Sulu, Uhuru

Post-order: Khaaaan, Chekov, McCoy, Scotty, Sulu, Uhuru, Spock, Kirk

Explanation:

The binary search tree is described in the diagram below.

The pre-order traversal of the binary tree gets the root, then the left node and right node. The in-order traversal picks the left node, the root node, and then the right node while the post-order traversal of the binary tree follows the left node, right node, and then the root node.

Suppose That The Following Elements Are Added In The Specified Order To An Empty Binary Search Tree:

Related Questions

U6L1 - Algorithms Solve Problems
I'm just really stuck on this and have no clue what to do.

Answers

Answer:

1. Left hand picks up card on position 1

2. Assume position 2 as the "working position"

3. Free hand picks up card on working position.

4. Compare two cards, put back the largest card on working position.

5. Increase working position by 1.

6. Go to step 3 if there is a card at the new working position.

7. Smallest card is in your hand.

instructions and programs data are stored in the same memory in which concept

Answers

Answer:

The term Stored Program Control Concept refers to the storage of instructions in computer memory to enable it to perform a variety of tasks in sequence or intermittently.

Assume that you are able to do an exhaustive search for the key to an encrypted message at the rate of 100 Million trials per second. (a) (7 Points) How long in (days or years) would it take for you to find the key on the average to a code that used 112-bit key on average

Answers

Answer:

8.22 × 10²⁰ years

Explanation:

Given that:

Total frequency = 100 million per record

The length of the key used for the encryption = 112 bit key

To calculate the number of seconds in  a year, we have:

= 365 × 24 × 60 × 60

= 3.1536 × 10⁷ seconds

Thus, on average, the number of possible keys that is required to check for the decryption should be at least  2¹¹¹ keys.

[tex]\mathbf{ = \dfrac{2^{111} \times 10^6}{3.1536 \times 10^7} = 8.22 \times 10^{20} \ years}[/tex]

Thus, it will take a total time of about 8.22 × 10²⁰ years on average.

Sophisticated modeling software is helping international researchers

Answers

Answer:

A. increase the pace of research in finding and producing vaccines.

Explanation:

These are the options for the question;

A. increase the pace of research in finding and producing vaccines.

B. analyze computer systems to gather potential legal evidence.

C. market new types of products to a wider audience.

D. create more intricate screenplays and movie scripts.

Modeling software can be regarded as computer program developed in order to build simulations as well as other models. modelling software is device by international researchers to make research about different vaccines and other drugs and stimulants to combat different diseases. It helps the researcher to devoid of details that are not necessary and to deal with any complexity so that solution can be developed. It should be noted that Sophisticated modeling software is helping international researchers to increase the pace of research in finding and producing vaccines.

Consider the decision version of the Binary Search algorithm, which takes an array a of integers of size n, an integer x to be found, and gives a boolean result. Which of the following statements corresponds to a pair of valid Pre- and Post-conditions?
Note: Assume issorted() implies ascending numeric order:______.
A) PRE:n > 1
POST: result == x E a A is Sorted (a)
B) PRE: True
POST:isSorted(a) An > 1 C) PRE:n > 1A is Sorted (a). 10 sxs a[n-1]
POST: result == x E a vissorted(a)
D) PRE:n 1 An == size (a) A is Sorted (a) A a [0] SX Sa(n-1)
POST: result == XE a
E) PRE:n > i^n -- size (a) ^ a[0] 5 x 5 a (n-1]
POST: result = X Ea

Answers

Answer:

B

Explanation:

I am not for sure

PRE: True POST: is Sorted(a) An > 1 C) PRE : n > 1A is Sorted (a). 10 sxs a[n-1] POST: result == x E a vissorted (a).

What is computer programming?

Computer programming is defined as the process of carrying out a specific computation, typically through creating an executable computer program. Computer programmers create code and scripts, modify them, and test them to make sure that software and applications function as intended. They convert the blueprints made by engineers and software developers into computer-readable instructions.

The algorithm determines whether the key the number you're looking for and the array's middle value are equal. If so, the key is in the middle and the search is complete. The program then determines if the key is larger or less than the middle value if it isn't.

Thus, PRE: True POST: is Sorted(a) An > 1 C) PRE : n > 1A is Sorted (a). 10 sxs a[n-1] POST: result == x E a vissorted (a).

To learn more about computer programming, refer to the link below:

https://brainly.com/question/3397678

#SPJ2

What direction would a sprite go if you constantly increased its x property? Your answer What direction would a sprite go if you constantly decreased its y property?* Your answer Do you feel you understand sprite movement and how to create the counter? Your answer​

Answers

Answer:

decrease x property,It would go left

decrease y property, it would go down

yes

Explanation:

We have looked at several basic design tools, such as hierarchy charts, flowcharts, and pseudocode. Each of these tools provide a different view of the design as they work together to define the program. Explain the unique role that each design tool provides (concepts and/or information) to the design of the program.

Answers

Answer:

Answered below

Explanation:

Pseudocode is a language that program designers use to write the logic of the program or algorithms, which can later be implemented using any programming language of choice. It helps programmers focus on the logic of the program and not syntax.

Flowcharts are used to represent the flow of an algorithm, diagrammatically. It shows the sequence and steps an algorithm takes.

Hierarchy charts give a bird-eye view of the components of a program, from its modules, to classes to methods etc.

Suppose Alice and Bob are sending packets to each other over a computer network. SupposeTrudy positions herself in the network so that she can capture all the packets sent by Alice and sendwhatever she wants to Bob; she can also capture all the packets sent by Bob and send whatever she wantsto Alice. List one active and one passive malicious thing that Trudy can do from this position.

Answers

Explanation:

can observe the contents of all the packets sent and even modify the content.can prevent packets sent by both parties from reaching each other.

From a network security standpoint, since we are told that Trudy "positions herself in the network so that she can capture all the packets sent", it, therefore implies that the communication between Alice and Bob is vulnerable to modification and deletion.

According to the vulnerability assessment methodology, vulnerabilities are determined by which 2 factors?

Answers

Answer:

3 and 60!

Explanation:

what is a computer modem?​

Answers

Answer:

A modem modulates and demodulates electrical signals sent through phone lines, coaxial cables, or other types of wiring.

PHP is based on C rather than ______.


Select one:


a. PEARL


b. JAVA


c. PERL


d. COBOL

Answers

Answer:

The answer is "option b and option d"

Explanation:

In this question, both choice "b and c" is correct because Java is compiled and run on a JVM  and it uses the byte code. On the other hand, PHP has interpreted language, that compiled into the bytecode after that the output engine interpreted. Similarly, the COBOL is used for enterprise, finance, and administrative systems, and PHP is used in web creation.

write a program that display yor name

Answers

Answer:

For python:

Explanation:

Name = input("What is your name? ")

print("Hello " + Name + "!")

A mom is planning a theme park trip for her husband, herself, and their three children. The family has a budget of $500. Adult tickets cost $25 each, and child tickets cost $25 each. Which Excel formula should be entered in cell B5

Answers

Complete question :

Sue is planning a theme park trip for her husband, herself, and her three children. She has a budget of $500. Adult tickets cost $55 each, and child tickets cost $25 each. Which formula should go in cell B4?

Answer:

=E1B1+E2B2

Explanation:

Cost of adult ticket = $55

Child ticket = $25

Number of adult = 2

Number of children = 3

Assume :

Cost of adult ticket = $55 = E1

Child ticket = $25 = E2

Number of adult = 2 = B1

Number of children = 3 = B2

The formula that should go into cell B5 in other to calculate total amount :

Total should be :

($55*2) + ($25*3)

=E1B1+E2B2

Please select the word from the list that best fits the definition Asking for review material for a test

Answers

Answer:

B

Explanation:

Answer:

B is the answer

Explanation:

The Clean Air Act Amendments of 1990 prohibit service-related releases of all ____________. A) GasB) OzoneC) MercuryD) Refrigerants

Answers

Answer:

D. Refrigerants

Explanation:

In the United States of America, the agency which was established by US Congress and saddled with the responsibility of overseeing all aspects of pollution, environmental clean up, pesticide use, contamination, and hazardous waste spills is the Environmental Protection Agency (EPA). Also, EPA research solutions, policy development, and enforcement of regulations through the resource Conservation and Recovery Act .

The Clean Air Act Amendments of 1990 prohibit service-related releases of all refrigerants such as R-12 and R-134a. This ban became effective on the 1st of January, 1993.

Refrigerants refers to any chemical substance that undergoes a phase change (liquid and gas) so as to enable the cooling and freezing of materials. They are typically used in air conditioners, refrigerators, water dispensers, etc.

Answer:

D

Explanation:

Edhesive 1.7 code practice question 2

Answers

Answer:

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

print ("Answer= "+ str(num * 12))

Explanation:

Write a program that plays the popular scissor-rockpaper game. (A scissor can cut a paper, a rock can knock a scissor, and a paper can wrap a rock.) The program randomly generates a number 0, 1, or 2 representing scissor, rock, and paper. The program prompts the user to enter a number 0, 1, or 2 and displays a message indicating whether the user or the computer wins, loses, or draws. Here are sample runs:

scissor (0), rock (1), paper (2): 1
The computer is scissor. You are rock. You won
scissor (0), rock (1), paper (2): 2
The computer is paper. You are paper too. It is a draw

Answers

Answer:

import random

computer = random.randint(0, 2)

user = int(input("scissor (0), rock (1), paper (2): "))

if computer == 0:

   if user == 0:

       print("The computer is scissor. You are scissor too. It is a draw")

   elif user == 1:

       print("The computer is scissor. You are rock. You won")

   elif user == 2:

       print("The computer is scissor. You are paper. Computer won")

elif computer == 1:

   if user == 0:

       print("The computer is rock. You are scissor. Computer won")

   elif user == 1:

       print("The computer is rock. You are rock too. It is a draw")

   elif user == 2:

       print("The computer is rock. You are paper. You won")

elif computer == 2:

   if user == 0:

       print("The computer is paper. You are scissor. You won")

   elif user == 1:

       print("The computer is paper. You are rock. Computer won")

   elif user == 2:

       print("The computer is paper. You are paper too. It is a draw")

Explanation:

*The code is in Python.

Import the random to be able to generate number number

Generate a random number between 0 and 2 (inclusive) using randint() method and set it to the computer variable

Ask the user to enter a number and set it to the user variable

Check the value of computer the computer variable:

If it is 0, check the value of user variable. If user is 0, it is a draw. If user is 1, user wins. If user is 2, computer wins

If it is 1, check the value of user variable. If user is 0, computer wins. If user is 1, it is a draw. If user is 2, user wins

If it is 2, check the value of user variable. If user is 0, user wins. If user is 1, computer wins. If user is 2, it is a draw

Where does the revolver get the IP address of a site not visited before?


the file server


the print spooler


the IP provider


the name server

Answers

Answer:

The name server

Explanation:

The correct answer is name servers because on the internet, they usually help web browsers and other services to access the records of the domain name system(DNS) by direction of traffic through connection of the domain name with the IP address of the web server.

b) Develop a truth table for expression AB+ C.

Answers

It will become c-ab :)

5. All sites are required to have the following reference materials available for use at VITA/TCE sites in paper or electronic format: Publication 17, Publication 4012, Volunteer Tax Alerts (VTA), and Quality Site Requirement Alerts (QSRA). AARP Foundation Tax Aide uses CyberTax Alerts in lieu of VTAs and QSRAs. What other publication must be available at each site and contains information about the new security requirements at sites

Answers

Answer:

Publication 5140.

Explanation:

The acronym VITA stands for Volunteer Income Tax Assistance and TCE stands for Tax Counseling for the Elderly. VITA/TCE is a certification gotten from the Internal Revenue Service in which the holders of such certification are trained on how to help people that have disabilities or that their incomes earners that are low. These volunteers help these set of people to prepare for their tax return.

In order to make the volunteers to be able to perform their work with high accuracy, the Department of Treasury, Internal Revenue Service gave out some aids for Quality Site. One of the aids which is the one contains information about the new security requirements at sites is given in the Publication 5140.

If you are writing an algorithm and you aren’t confident that you understand the problem, what can you do?

Answers

Answer:

divide it into smaller pieces

Explanation:

Usually, the main reason a programmer does not understand a problem fully is that there is too much information. The best way to try and fully understand a problem is to divide it into smaller pieces. Start off by answering the question what is the expected output for an input. Then divide each individual issue within the problem. This will allow you as a programmer/developer to create an individual solution for each individual issue within the problem and then test to make sure that the input gives the correct output.

Key Categories: more libraries and thousands of functions


Select one:


a. Power


b. Practicality


c. Possibility


d. Price

Answers






b. power
YOUR WELXOME



Key Categories: more libraries and thousands of functions is Practicality. Hence, option B is correct.

What is Practicality?

the ability to perform something or put something into action: Bankers expressed dissatisfaction with the new rules' viability as workable answers to challenging issues. He believes that wind energy can be a useful renewable energy source. For the majority of residential residences, the equipment is too large to be useful. Although the shoes are attractive, they are not particularly useful. The book is a helpful manual for maintaining cars.

tailored or created for actual use; beneficial: useful guidelines. interested or skilled in practical application or work: a pragmatic politician with a record of enacting significant legislation.

The definition of practical thinking is "examining ways to adapt to your surroundings or change your environment to fit you" in order to achieve a goal. Practicality is a term that is used occasionally.

Thus, option B is correct.

For more information about Practicality, click here:

https://brainly.com/question/24313388

#SPJ5

Consider the following class definition.
public class Tester
{
privtae int num1;
private int num2;
/missing constructor /
}
The following statement appears in a method in a class other than Tester. It is intended t o create a new Tester object t with its attributes set to 10 and 20.
Tester t = new Tester(10,20);

Which can be used to replace / missing constructor / so that the object t is correctly created?

Answers

Answer:

Explanation:

The following constructor needs to be added to the code so that the object called t can be created correctly...

public Tester(int arg1, int arg2) {

    num1 = arg1;

    num2 = arg2;

}

This basic constructor will allow the object to be created correctly and will take the two arguments passed to the object and apply them to the private int variables in the class. The question does not state what exactly the Tester constructor is supposed to accomplish so this is the basic format of what it needs to do for the object to be created correctly.

Consider the following code segment.

int[] arr = {1, 2, 3, 4, 5};

Which of the following code segments would correctly set the first two elements of array arr to 10 so that the new value of array arr will be {10, 10, 3, 4, 5} ?

a. arr[0] = 10;
arr[1] = 10;

b. arr[1] = 10;
arr[2] = 10;

c. arr[0, 1] = 10;

d. arr[1, 2] = 10;
e. arr = 10, 10, 3, 4, 5;

Answers

Answer:

A.)

arr[0] = 10;

arr[1] = 10;

Explanation:

Given the array:

arr = {1,2,3,4,5}

To set the first two elements of array arr to 10.

Kindly note that ; index numbering if array elements starts from 0

First element of the array has an index of 0

2nd element of the array has an index of 1 and so on.

Array elements can be called one at a time using the array name followed by the index number of the array enclosed in square brackets.

arr[0] = 10 (this assigns a value of 10 to the index value, which replace 1

arr[1] = 10 (assigns a value of 10 to the 2nd value in arr, which replaces 2

company gives the following discount if you purchase a large amount of supply. Units Bought Discount 10 - 19 20% 20 - 49 30% 50 - 99 35% 100 40% If each item is $4.10. Create a program that asks the user how many items they want to buy, then calculates the pre-discount price, the amount of discount and the after discount price. So for example if order 101 items, I should see something similar to the following: With your order of 101 items, the total value will be $414.10 with a discount of $165.64 for a final price of $248.46. Your output should be very well organized, and use the correct formatting. (Including precision)

Answers

Answer:

In Python:

order = int(input("Order: "))

discount = 0

if(order >= 10 and order <20):

    discount = 0.20

elif(order >= 20 and order <50):

    discount = 0.30

elif(order >= 50 and order <100):

    discount = 0.35

elif(order >= 100):

    discount = 0.40

price = order * 4.1

discount = discount * price

print("With your order of "+str(order)+" items, the total value will be $"+str(round(price,2))+" with a discount of $"+str(round(discount,2))+" for a final price of $"+str(round((price-discount),2)))

Explanation:

This prompts the user for number of orders

order = int(input("Order: "))

This initializes the discount to 0

discount = 0

For orders between 10 and 19 (inclusive)

if(order >= 10 and order <20):

-----------discount is 20%

    discount = 0.20

For orders between 20 and 49 (inclusive)

elif(order >= 20 and order <50):

-----------discount is 30%

    discount = 0.30

For orders between 50 and 99 (inclusive)

elif(order >= 50 and order <100):

-----------discount is 35%

    discount = 0.35

For orders greater than 99

elif(order >= 100):

-----------discount is 40%

    discount = 0.40

This calculates the total price

price = order * 4.1

This calculates the pre discount

discount = discount * price

This prints the report

print("With your order of "+str(order)+" items, the total value will be $"+str(round(price,2))+" with a discount of $"+str(round(discount,2))+" for a final price of $"+str(round((price-discount),2)))

Computer science pls awnser

Answers

Answer: Secure shell (SSH)

Explanation:

Imagine that you are designing an application where you need to perform the operations Insert, DeleteMaximum, and Delete Minimum. For this application, the cost of inserting is not important, because itcan be done off-line prior to startup of the time-critical section, but the performance of the two deletionoperations are critical. Repeated deletions of either kind must work as fast as possible. Suggest a datastructure that can support this application, and justify your suggestion. What is the time complexity foreach of the three key operation

Answers

Answer:

A stack data structure should be used. The time complexity of the insert, delete minimum and maximum operation is O(1).

Explanation:

The stack data structure is an indexed structure that holds data in an easily retrievable way. Data is held in a first-in last-out method as elements in the structure are popped out from the end of the stack when retrieved sequentially.

The worst-case time complexity of getting the minimum and maximum elements in a stack and deleting it is O(1), this is also true for inserting elements in the stack data structure.

Output values below an amount
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value.
Ex: If the input is:
5 50 60 140 200 75 100
the output is:
50 60 75
The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75.
For coding simplicity, follow every output value by a space, including the last one. Such functionality is common on sites like Amazon, where a user can filter results.

Answers

Answer:

Explanation:

The following code is written in Python and it is a function called filter, which takes in the requested inputs. It then places the threshold in its own variable and pops it out of the array of inputs. Then it loops through the array comparing each element with the threshold and printing out all of the ones that are less than or equal to the threshold.

def filter():

   num_of_elements = input("Enter a number: ")

   count = 0

   arr_of_nums = []

   while count <= int(num_of_elements):

       arr_of_nums.append(input("Enter a number: "))

       count += 1

   threshold = arr_of_nums[-1]

   arr_of_nums.pop(-1)

   print(threshold)

   for element in arr_of_nums:

       if int(element) < int(threshold):

           print(element)

       else:

           continue

Consider the following statement, which is intended to create an ArrayList named a to store only elements of type Thing. Assume that the Thing class has been properly defined and includes a no-parameter constructor.
ArrayList a = /* missing code */;
Which of the following can be used to replace /* missing code */ so that the statement works as intended?
A: new Thing()
B: new ArrayList()
C: new ArrayList(Thing)
D: new ArrayList()
E: new ArrayList<>(Thing)
Consider the following statement, which is intended to create an ArrayList named numbers that can be used to store Integer values.
ArrayList numbers = /* missing code */;
Which of the following can be used to replace /* missing code */ so that the statement works as intended?
new ArrayList()
new ArrayList
new ArrayList()
A: III only
B: I and II only
C: I and III only
D:II and III only
E: I, II, and III

Answers

Answer:

B: new ArrayList()

Explanation:

When dealing with Java syntax you always need to initialize an ArrayList object with its constructor. From the options listed the only correct option would be B: new ArrayList(). This would correctly initialize the ArrayList object but is not necessarily the recommended way of doing this. The truly recommended way would be the following

ArrayList<Thing> a = new ArrayList<Thing>()

ArrayLists are simply resizable array.

The statement that can replace the missing code is (b) new ArrayList();The statements that can replace the missing code is (c) I and III only

The syntax to create an ArrayList is:

ArrayList<Type> str = new ArrayList<Type>();

Another possible syntax is:

ArrayList var_name= new ArrayList();

The above declarations mean that: the statement that can replace the missing code is (b) new ArrayList();

While the statements that can replace the missing code is (c) I and III only

Read more about ArrayLists at:

https://brainly.com/question/18323069

Write a function species_count that returns the number of unique Pokemon species (determined by the name attribute) found in the dataset. You may assume that the data is well formatted in the sense that you don't have to transform any values in the name column. For example, assuming we have parsed pokemon_test.csv and stored it in a variable called data:

Answers

Answer:

Escribe una función species_count que devuelva el número de especies de Pokémon únicas (determinadas por el atributo de nombre) que se encuentran en el conjunto de datos. Puede suponer que los datos están bien formateados en el sentido de que no tiene que transformar ningún valor en la columna de nombre. Por ejemplo, suponiendo que analizamos pokemon_test.csv y lo almacenamos en una variable llamada datos:

Explanation:

Other Questions
The height of a painting is 30 ft. Between which two consecutive whole numbers is 30? 7 and 8 6 and 7 4 and 5 5 and 6 Many small firms seek to establish a particular niche in the market, realizing that they cannot afford to operate on a larger scale without exposing themselves to considerable risk of retaliation from larger companies. When a number of small businesses are operating in this manner, they are forcing the larger businesses to recognize and account for their influence on the market. In this way, small businesses are primarily Question 49 options: describe the historical development of building material being used in the construction indsury The distribution of individual student scores on for a department wide biology test at a large university are skewed left with a mean of 80.2 and standard deviation of 4.2 points. A random sample of 46 pre-med majors in this biology course is taken. Which statement is correct about the resulting sampling distribution? On Monday, a local hamburger shop sold a combined total of 276 hamburgers and cheeseburgers. The number of cheeseburgers sold was two times the number of hamburgers sold. How many hamburgers were sold on Monday? PLEASE HELPWhich are reasons why so many people live on the ring of fire?Check all that apply. A. Many tourists are drawn to the beauty created by the volcanic islands and mountains near the ocean. B. The tsunami prediction industry created jobs, causing many people to move to areas where they are needed. C. There has been considerable development of the earthquake and volcano prediction industry. D. Subduction zones are often located in good places for seaports If y varies directly as x, and y is 6 when x is 72, what is the value of y when x is 8?1/92/35496 In Sanford, the high temperature was 54F on Saturday and 49F on Sunday. What is the percent of change in the high temperature from Saturday to Sunday? (Round to the hundreth.) If The RNA strand is AUG, what is the protein it produces. Explain how the Separation of Powers limits the power of the Federal Government. Give three specific examples. Evaluate the following expression2+(3-2x2)x1 Solve the inequality [tex] 25 + 8x \leqslant 475[/tex] Search your home for a rectangular prism. Some examples are a cereal box, a CD case, or a coffee table. Measure your prism using appropriate units, such as inches, centimeters, or feet.Complete the following. Show all work for calculations.List the dimensions of your box. Be sure to include the units (in, cm, ft, etc.).Describe the shape of the cross section when the box is cut parallel to the base.What is the surface area of the box?What is the surface area of the box if it is scaled up by a factor of 10?What is the volume of the box?What is the volume of the box if it is scaled down by a factor of 110? Please list the item In the given parallelogram, BELT,find the value of p,q,x,y The variety of organisms within an ecosystem is characteristic of which type of diversity?Genetic diversityb. Ecosystem diversityc. Species diversityd. Regional diversityPlease select the best answer fron] the choices providedB The original inhabitants of England were the... Write the simplified expression to represent the perimeter of the square. Did you see the game between the Hornets and the Grizzlies the one that went into overtime? (comma) Enter an equation in point-slope form for the line.Slope is 8 and (-7, -1) is on the line.The equation of the line in point slope form is: can someone help me please