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
Marianna [84]
2 years ago
12

(2 points) starting from the root node, we want to populate a bst with the keys in a given list without altering the key order.

using the keys and the tree in question a) as an example, i) display the ordered list of the keys which can be sequentially inserted into the tree. ii) describe an algorithm to get the list above systematically.
Computers and Technology
1 answer:
love history [14]2 years ago
6 0

In order to systematically fill a Binary search tree with a fixed shape, at each node we see the number of nodes that must be greater and the number of nodes that must be smaller than it.

What is binary search tree explain?

A rooted binary tree that satisfies the binary search property is known as a binary search tree.

                  In a binary search tree, the nodes are sorted in total order with the nodes with keys higher than any specific node stored on the right subtrees and those with equal to or less than placed on the left subtrees.

What are binary search trees and binary binary?

A node in a binary tree can have 0, 1, or 2 nodes, making it a non-linear data structure. Each node has a left pointer, right pointer, and data element on its own.

                   A structured node arrangement characterizes a binary tree called a binary search tree. Every subtree must also belong to that specific structure.

Learn more about binary search tree

brainly.com/question/12946457

#SPJ4

You might be interested in
A _______ is a shortcut to a web page saved in a list in the internet explorer desktop application.
elena-14-01-66 [18.8K]
It is called a favorite
6 0
4 years ago
What is output by the following C# code segment?int temp;temp = 180;while ( temp != 80 ) {if ( temp > 90 ) {Console.Write( "T
Artemon [7]

Answer:

This porridge is too hot! This porridge is just right!

Explanation:

I am going to explain every line of the given C# code to give explanation of the output.

  • The first statement int temp declares a variable temp.
  • Then the temp variable is assigned a value 180.
  • The block of statement in while loop body will keep executing until the value in temp variable gets equal to 80. The while loop first checks if the value of temp is not equal to 80. As the value of temp=180 which is not equal to 80, this means that the condition of while loop evaluates to true so the block of code in the body of the loop is reached.
  • There is an if condition inside while loop which checks if the value in temp variable is greater than 90. As value of temp=180 which is greater than 90 so the condition is true.
  • As the condition in the if statement evaluates true so the block of code which is the part of this if statement will be executed:

             {Console.Write( "This porridge is too hot! " );

                  temp = temp – ( temp > 150 ? 100 : 20 ); }

  • The first statement is executed which displays this message: This porridge is too hot!
  • Next   temp = temp – ( temp > 150 ? 100 : 20 ); statement will change the value of temp. It has the conditional operator which works as follows:

                 Here, temp>150 is the condition to be evaluated.

  • If this condition is True then 100 will be returned else 20 will be returned. The value returned is then subtracted from the value of temp and the subtraction result will become the new value of temp. As the value of temp which is 180 is greater than 150 so 100 is returned and is subtracted from the value of temp (180).

                                        temp= 180-100

                                             temp=80

  • So the new value of temp is 80.
  • The else part will not be executed because the condition in if statement was true and also we can see that temp is not less than 70. It means that the porridge is too cold part will not be executed.
  • The while loop while(temp!=80) will again be checked. As the new value of temp is now 80, so the condition gets false which breaks the while loop and program control will leave the body of while loop.
  • After the control comes out of the while loop, there is another if statement. This statement checks if the value of temp variable is equal to 80. It is true as the new value of temp is now 80 after that execution of while loop block of code.
  • As the if condition evaluates to true the statement

                    Console.WriteLine( "This porridge is just right!" );

       will be executed which displays the message:

                                  This porridge is just right.

  • Hence the output of the given code is:

           This porridge is too hot! This porridge is just right!

7 0
3 years ago
The cpu understands instructions written in a binary machine language. <br> a. true <br> b. false
Jet001 [13]

The CPU understands instructions written in a binary machine language: A. true.

<h3>What is a CPU?</h3>

CPU is an abbreviation for central processing unit and it can be defined as the main components of a computer because it acts as the “brain” of a computer and does all the processing, calculations, and logical control of the data entered through the keyboard into output that are displayed on the monitor.

This ultimately implies that, the central processing unit (CPU) performs most of the calculations, which enables a computer to function and is sometimes referred to as the “brain” of the computer.

Generally, the central processing unit (CPU) only understands instructions that are written in a binary machine language.

Read more on CPU here: brainly.com/question/5430107

#SPJ1

7 0
2 years ago
What is indirect recursion?
marshall27 [118]
Most basic examples of recursion, and most of the examples presented here, demonstrate direct recursion, in which a function calls itself. Indirect recursion occurs when a function is called not by itself but by another function that it called (either directly or indirectly). For example, if f calls f, that is direct recursion, but if f calls g which calls f, then that is indirect recursion of f. Chains of three or more functions are possible; for example, function 1 calls function 2, function 2 calls function 3, and function 3 calls function 1 again.

Indirect recursion is also called mutual recursion, which is a more symmetric term, though this is simply a difference of emphasis, not a different notion. That is, if f calls g and then g calls f, which in turn calls g again, from the point of view of f alone, f is indirectly recursing, while from the point of view of g alone, it is indirectly recursing, while from the point of view of both, f and g are mutually recursing on each other. Similarly a set of three or more functions that call each other can be called a set of mutually recursive functions.
3 0
3 years ago
Assume that programs spend about 25% of their time waiting for I/O operations to complete. If there are FOUR programs loaded int
natima [27]

Answer:

0.9961

Explanation:

Given that:

Proportion of time waiting for I/O operation to complete = 25% = 0.25

Number of programs waiting in memory = 4

Using the CPU Utilization formula :

CPU Utilization = 1 - p^n

1 - 0.25^4

1 - 0.00390625

0.99609375

5 0
3 years ago
Other questions:
  • A mobile device is freezing almost daily. The device remains powered on and the screen illuminated. The user restarts the device
    13·1 answer
  • What technique creates different hashes for the same password? ccna routing protocols final answers?
    7·1 answer
  • What are 7 key traits for knowing your audience
    6·2 answers
  • Does anyone know what happened to Cole Morgen, the actor?
    11·1 answer
  • Who designed analatic engine in the 1930's?​
    10·1 answer
  • A user complains that her computer is performing slowly. She tells you the problem started about a week ago when new database so
    12·1 answer
  • Explain the following as used in Tally Accounting Software:
    8·1 answer
  • PLZZZZ HELP!!!
    12·2 answers
  • True or False: the sky looks blue because it is reflecting the blue ocean.​
    12·2 answers
  • In the 1760s and early 1770s, the British government wanted to raise money by taxing the residents of its colonies in North Amer
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!