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
Irina-Kira [14]
2 years ago
6

If you store a binary tree in an array the index of the right child and the left child is computed by _______

Computers and Technology
1 answer:
Fiesta28 [93]2 years ago
3 0

Answer:

left child = 2 index +1 & right child = 2 index + 2

Please Mark Brainliest If This Helped!

You might be interested in
Make sure to read all of these specifications carefully. Write a function, named array_shifter, that accepts an array of doubles
rosijanka [135]

Answer:

import java.util.Arrays;

public class num2 {

   public static void main(String[] args) {

//Create and initialize the first array        

double [ ]arr = {3.5, 5.6, 4.5, 6.7};

// Get the length of the array

       int n = arr.length;

      //Call the method Array Shifter inside the output statement

       System.out.println(Arrays.toString(array_shifter(arr,n)));

   }

   static double [] array_shifter(double [ ] doubleArray, int n){

       double [] narr = new double[n+1];

       //Loop through from index 1

       for(int i =0; i<narr.length-1; i++){

           narr[i] = doubleArray[i];

       }

       //Put a new element at the last index

       narr[narr.length-1] = 1.1;

       return narr;

   }

}

Explanation:

This is implemented in Java

Read detailed comments in the solution

The method array_shifter creates a new array that is one element larger than the array it received as argument and returns it

6 0
3 years ago
If myClass has a constructor with a parameter of type String, select the other constructor that should be included.
JulijaS [17]

Answer:

d. public myClass( ) {. . .}

Explanation:

A constructor is a special method that is called when an object of a class is created. It is also used to initialize the instance variables of the given class. A class may have one or more constructors provided that these constructors have different signatures. A class that does not have a constructor explicitly defined has a default parameterless constructor.

Having said these about a constructor, a few other things are worth to be noted by a constructor.

i. In Java, a constructor has the same name as the name of its class.

For example, in the given class <em>myClass</em>, the constructor(s) should also have the name <em>myClass</em>.

ii. A constructor does not have a return value. It is therefore wrong to write a constructor like this:

<em>public void myClass(){...}</em>

This makes option a incorrect.

iii. When a constructor with parameters is defined, the default parameterless constructor is overridden. This might break the code if some other parts  of the program depend on this constructor. So it is advisable to always explicitly write the default parameterless constructor.

This makes option d a correct option.

Other options b and c may also be correct but there is no additional information in the question to help establish or justify that.

7 0
3 years ago
Which is a network of devices built around a person, typically within 10 meters of range?
11111nata11111 [884]

Answer:

A LAN

Explanation:

A LAN, or a Local Area Network, is a network of devices typically within 10 meters of range regardless of what it is built around.

6 0
3 years ago
What are some of the academic benefits of a later start time that Jordan mentions​
maksim [4K]

Answer:

students will be more attentive and active

Explanation:

4 0
3 years ago
If you play video games, please answer these questions it’s for a survey for my game development class!!
yarga [219]

Answer:

Doom, fortnlte, mlnecraft, ark survival evolved, ark survival of the fittest, terraria, raft, among us, ect.

First person shooters, Third person shooters, Creative games

8-10 years

More VR, better graphics, more realistic

Maybe, not anytime soon.

Explanation:

5 0
2 years ago
Other questions:
  • Imagine that the following two lines of code are placed inside a
    11·1 answer
  • How do you calculate the life span of patents?
    13·1 answer
  • A-1 grdening supply is preparing a reprt to hand out to the customerez in pointes form only.why should the reprts writers avoid
    9·2 answers
  • Which tool can be used to increase the space between a bullet point or a number and text?
    11·2 answers
  • I'm trying to move the figure a little away from, the column line and every time I move it and click ok it goes back to being be
    11·1 answer
  • For a direct-mapped cache design with a 64-bit address, the following bits of the address are used to access the cache
    7·1 answer
  • A variable is assigned a value on line 328 of a program. Which of the following must be true in order for the variable to work?
    12·2 answers
  • Which of the following is NOT a reason we use subprograms?
    7·1 answer
  • What is the importance of knowing the concept of programming?
    8·1 answer
  • Pleaseeeee helpppppppp​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!