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
bearhunter [10]
2 years ago
14

use the following binary search tree to answer the questions. a. how many comparisons are needed to search for ""2"" in this tre

e? b. you need to add 7 to the tree. where will it go?
Computers and Technology
1 answer:
Nesterboy [21]2 years ago
6 0

A data structure called a binary search tree makes it simple to keep track of a sorted list of numbers.

<h3>What is a binary search tree?</h3>

A binary search tree, also known as an ordered binary tree or a sorted binary tree in computer science, is a rooted binary tree data structure where each internal node's key is higher than all the keys in its left subtree and less than all the keys in its right subtree.

A data structure called a binary search tree makes it simple to keep track of a sorted list of numbers. Because each tree node has a maximum of two offspring, it is known as a binary tree. It can be used to search for the presence of a number in O(log(n)) time.

A binary search tree (BST) is a specific type of binary tree in which every node has a comparable key and a connected or associated value.

To learn more about binary search trees refer to:

brainly.com/question/28295292

#SPJ4

You might be interested in
HELPPPPPOOP
alexgriva [62]

Answer:b

Explanation:

8 0
2 years ago
Brenda has created a Microsoft Excel spreadsheet which has 1000's of cells of data. She is looking for specific information in t
vichka [17]

Brenda should use the Ctr+F shortcut to quickly find a specific information in the spreadsheet file.

4 0
3 years ago
Can Any One Marry Baby YODA?
Burka [1]

Answer:

Yes, i mean come at me lol

Explanation:

8 0
3 years ago
Read 2 more answers
Compare the applications below:
alisha [4.7K]
Both can be the same thing
4 0
3 years ago
Read 2 more answers
A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-lif
Elena L [17]

Answer:

// here is code in java.

import java.util.*;

class Solution

{

// main method of class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // declare variable

         double caffeine;

    // scanner object to read input from user

       Scanner scr=new Scanner(System.in);

       System.out.print("Enter the initial amount of caffeine:");

        // read the initial amount of caffeine

           caffeine=scr.nextDouble();

          // calculate amount of caffeine after 6,12,18 hours

          for(int i=1;i<=3;i++)

          {

               System.out.println("After "+ i*6+" hours:"+(caffeine/2)+" mg");

               // update the caffeine after every 6 hours

               caffeine=caffeine/2;

          }

                 

   }catch(Exception ex){

       return;}

}

}

Explanation:

Create a variable "caffeine" to store the initial amount of caffeine given by user. Run a loop for three time, it will calculate the amount of caffeine left after every 6 hours.First it will give the amount of caffeine left after 6 hours, then caffeine left after 12 hours and in last caffeine after 18 hours.

Output:

Enter the initial amount of caffeine:100

After6 hours:50.0 mg

After12 hours:25.0 mg

After18 hours:12.5 mg

8 0
4 years ago
Other questions:
  • How can you create the first row of the table as the header of the table
    15·2 answers
  • Which of the following was one of the first internet search engines? A. archie B. google C. Yahoo D.ask
    7·1 answer
  • What state yall be livin in?
    15·2 answers
  • Which charges a fee for access to read, research, or copy articles and other published materials?
    11·1 answer
  • Assume v is a vector of integers that has been declared and initialized. Write a statement that adds the value 42 to the vector.
    14·1 answer
  • What is the meaning of heart symbol in facebook?
    14·1 answer
  • Before posting a picture online, make sure to
    7·1 answer
  • Which language paradigm interacts well with database systems in business environments that use SQL? (I WILL GIVE BRAINLIEST TO T
    11·1 answer
  • When a cpu executes instructions as it converts input into output, it does so with _____.
    8·1 answer
  • What is a term commonly used to describe the Python dictionary feature in other programming languages
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!