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
borishaifa [10]
3 years ago
12

What is the difference between a heap (a minheap) and a binary search tree?

Computers and Technology
1 answer:
denis-greek [22]3 years ago
4 0

Answer:

Some differences between Heap and Binary search trees are as following:-

A heap is a complete binary tree.While a Binary Search Tree may be  a complete,prefect binary tree.

A minheap the root should be minimum than it's children So it efficient for finding minimum and maximum.While Binary search trees have different properties the root node should be greater than the left child and should be less than the right child.

You might be interested in
Write a method called findNames that meets the following specs: It takes two arguments: a list of strings, allNames, and a strin
Anna11 [10]

Answer:

public class Solution {

   public static void main(String args[]) {

       String[] allNames = new String[]{"Bob Smith", "Elroy Jetson", "Christina Johnson", "Rachael Baker", "cHRis", "Chris Conly"};

       String searchString = "cHRis";

       

       findNames(allNames, searchString);

   }

   

   public static void findNames(String[] listOfName, String nameToFind){

       ArrayList<String> resultName = new ArrayList<String>();

       

       for(String name : listOfName){

           if (name.toLowerCase().contains(nameToFind.toLowerCase())){

               resultName.add(name);

           }

       }

       

       for(String result : resultName){

           System.out.println(result);

       }

   }

}

Explanation:

The class was created called Solution. The second line define the main function. Inside the main function; we initialized and assign an array called allNames to hold the list of all name. Then a String called searchString was also defined. The searchString is the string to search for in each element of allNames array. The two variables (allNames and searchString) are passed as argument to the findNames method when it is called.

The method findNames is defined and it accept two parameters, an array containing list of names and the name to search for.

Inside the findNames method, we initialized and assigned an ArrayList called resultName. The resultName variable is to hold list of element found that contain the searchString.

The first for-loop goes through the elements in the allNames array and compare it with the searchString. If any element is found containing the searchString; it is added to the resultName variable.

The second for-loop goes through the elements of the resultName array and output it. The output is empty if no element was found added to the resultName variable.

During comparison, the both string were converted to lower case before the comparison because same lowercase character does not equal same uppercase character. For instance 'A' is not same as 'a'.

8 0
3 years ago
Michelle wants to define the scope of a software development project for the benefit of her company. How does defining the scope
telo118 [61]

Answer:

im pretty sure its A

Explanation:

it makes more sense

4 0
3 years ago
Solve for x<br><br>4d+3/8=-2​
Alexxx [7]

Answer:

-19/32

Explanation:

(If I assume d to be x)

4x+3/8=-2

or,4x=-2-3/8=-19/8

or,x=(-19/8)*(1/4)=-19/32

5 0
3 years ago
A Program is an Algorithm – a set of directions for the computer to follow.<br><br> True<br> False
d1i1m1o1n [39]

Answer:

True

Explanation:

5 0
2 years ago
An anchor tag can be coded using which two attributes?
IceJOKER [234]

Answer:

21212122121221212211212121212212121Explanation:

4 0
2 years ago
Other questions:
  • Describe mobile computing
    7·1 answer
  • Which features must you remove from a full gui installation of windows server 2012 r2 to convert it to a server core installatio
    15·1 answer
  • In the context of Information Technology Infrastructure Library, _____ delivers information technology IT services on an ongoing
    14·1 answer
  • If a form-based code is administered, then what does the administration section of the code specifically set forth?
    6·1 answer
  • Visual-verbal synergy has nothing to do with text, but solely with images used in a design.
    9·1 answer
  • A network needs to be set up with 60 subnets. Given the IPv4 class C address 192.168.100.0, what subnet mask value should be use
    7·1 answer
  • Divide 111001 by 1101​
    7·1 answer
  • Which of the following is not a responsibility of an operating system?
    9·2 answers
  • The classes Person and Airplane shall have the property to print information about themselves on a printer. Draw class and inter
    14·1 answer
  • The ____ file is typically saved with a prefix of inc_.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!