2 Consider the sequence of keys (5,16,22,45,2,10,18,30,50,12,1). Draw the result of inserting entries with these keys (in the gi
Juliette [100K]
Answer:
A) (2,4) tree
- Insertion of key 45 makes key unbalanced and this is because it violates the 2,4 tree so we split the node
- insertion of key 10 makes key unbalanced and this is because it violates the 2,4 tree so we split the node
B) Red-black tree
Explanation:
The diagrams for the solutions are attached showing the results of inserting entries
Answer:
Duplicate these displays.
Explanation:
<u>A. Show only on 1</u> <em>displays only the first screen and disconnects the second one</em>
<u>B. Extend these displays</u> <em>displays two different outputs on the same computer</em>
<u>C. Show only on 2.</u> <em>displays only the second screen and disconnects the first one</em>
<u>D. Duplicate these displays.</u> <em>displays the same output for both screen</em>
Answer:
//Code is created using java
import java.util.*;
// returns the sum
public int sum(int N)
{
if(N==1)
return (1);
else
return N+sum(N-1);
}
// code to return the Bipower ouput
public int BiPower(int N)
{
if(N==1)
return (2);
else
return 2*BiPower(N-1);
}
// Code to return TimesFive output
public int TimesFive(int N)
{
if(N==1)
return 5;
else
return 5 + timesFive(N-1);
}
public static void main(String args[])
{
//Prompts the user to enter a nonnegative integer
int N = Integer.parseInt.(console.readLine("Enter a nonnegative integer: "));
//Outputs the sum, Bipower and TimesFive
System.out.println(sum(n));
System.out.println(BiPower(n));
System.out.println(TimesFive(n));
}
}
Hi I would have to say B sorry if this answer is sucky but I'm trying my best to help you :D
Answer:
this isn't a fair question...
you'll either get 2,3 or 4
not a nice question