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
nata0808 [166]
3 years ago
15

What will be the index of leaf node in a right-skewd binary tree with height =7,where every parent has at most one child?​

Computers and Technology
1 answer:
Delvig [45]3 years ago
3 0

Answer:

There are 2 leaf nodes in the given binary tree.

Explanation:

A tree stores the elements in the form of a hierarchal structure. The first node which has children is called the root of the tree. And the nodes with no children are called leaf nodes.

In the given diagram, we can see that all nodes have children except C and D so C and D are leaf nodes.

Hence,

There are 2 leaf nodes in the given binary tree.

You might be interested in
The Internet is a worldwide network. What is the World Wide Web?
kolbaska11 [484]
 World Wide Web (WWW) is a network of online content that is formatted in HTML and accessed via HTTP
7 0
3 years ago
Please help, thanks! (simple question) I'm doing a project and need to ask two people what they think is the highest contributor
andreev551 [17]
What I think the highest is carbon dioxide . Because we use a lot of CO2 in every single day . So image that for 365 . We use a lot of carbon dioxide . In which that is ruining our earth
5 0
2 years ago
Write a static method middleValue that takes three int parameters, and returns a int . It should return the middle value of the
anygoal [31]

We use if-else structure to check the each possible scenario and return the median accordingly in the middleValue() method. The main is also provided so that you can test the method.

Comments are used to explain the each line.

You may see the output in the attachment.

public class Main

{

public static void main(String[] args) {

   

    //call the method for different scenarios

    System.out.println(middleValue(1, 2, 3));

    System.out.println(middleValue(1, 3, 2));

    System.out.println(middleValue(2, 1, 3));

    System.out.println(middleValue(2, 3, 1));

    System.out.println(middleValue(3, 1, 2));

    System.out.println(middleValue(3, 2, 1));

 

}

       //method that takes three int and returns an int

public static int middleValue(int n1, int n2, int n3) {

    //set the median as n1

    int median = n1;

   

    //check the situation where the n1 is the highest

    //if n2 is greater than n2 -> n1 > n2 > n3

    //if not -> n1 > n3 > n2

    if(n1 > n2 && n1 > n3){

        if(n2 > n3)

            median = n2;

        else

            median = n3;

    }

   

    //check the situation where the n2 is the highest

    //if n3 is greater than n1 -> n2 > n3 > n1

    //if not -> n2 > n1 > n3

    //note that we set the median as n1 by default, that is why there is no else part

    else if(n2 > n1 && n2 > n3){

        if(n3 > n1)

            median = n3;

    }

   

    //otherwise, n3 is the highest

    //if n2 is greater than n1 -> n3 > n2 > n1

    //if not -> n3 > n1 > n2

    //note that we set the median as n1 by default, that is why there is no else part

    else{

        if(n2 > n1)

            median = n2;

    }

   

    return median;

}

}

You may see another if-else question at:

brainly.com/question/13428325

6 0
3 years ago
Your foot brake must be able to stop your car within __________ when it is travelling at 20 mph.
ohaa [14]

Answer:

Your foot brake must be able to stop car within 5.18 m

Explanation:

d = s^{2}  / (250 * c_{f} )

d is breaking distance.

s is speed in km/h

c_{f} is coefficient of friction normally 0.8

250 is  constant.

Give the speed in mile first convert it to km/h

1 km = 1.60934 mile

speed in km= 20 * 1.60934

s =32.186 km/h

d=32.186^{2}  / (250 * 0.8)

d= 5.18m

7 0
3 years ago
Karishma is setting up a wired network for a small office. Which hardware component on the computer will help in network connect
igor_vitrenko [27]

A hardware component on the computer which will help in network connection is a network interface card.

<h3>What is a network interface card?</h3>

In Computer technology, a network interface card can be defined as a hardware component installed on a computer system which is used to connect to the Internet or create a network connection.

In this scenario, a hardware component on the computer which will help in network connection is a network interface card, and the cables she would use for the most economical network connection is an unshielded twisted pair cables because it is cheaper than the other types of cables.

Read more on cables here: brainly.com/question/25337328

#SPJ1

5 0
2 years ago
Other questions:
  • Write a program that reads three whole numbers and displays the average of the three number. Sample Run #: java Average3 Interac
    15·1 answer
  • The front surface of the CCD is called the _________
    11·1 answer
  • ________ is the extent to which differences in observed scale scores reflect true differences among objects on the characteristi
    13·1 answer
  • • What advantage does a circuit-switched network have over a packet-switched network? What advantages does TDM have over FDM in
    12·1 answer
  • To save a presentation, tap or click the save button on the Blank
    8·1 answer
  • HEEEEELPPP!!!BRAINLIEST!!! THIS IS URGENT!!!
    10·1 answer
  • What is the output of this Python code?
    8·1 answer
  • Assessment
    12·1 answer
  • A folder is a collection of related of data is true or false​
    10·2 answers
  • What two functions does tcp/ip perform?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!