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
Marizza181 [45]
3 years ago
13

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

ven order) into a. An initially empty (2,4) tree. b. An initially empty red-black tree.

Computers and Technology
1 answer:
Juliette [100K]3 years ago
6 0

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

You might be interested in
When users talk about font size,
koban [17]

Answer:

The answer is 10......

4 0
3 years ago
Read 2 more answers
Header and footer elements such as worksheet name, current date, and time are _____ elements, they change as your worksheet does
mario62 [17]
<span>Header and footer elements such as worksheet name, current date, and time are dynamic elements, they change as your worksheet does. Because the information they </span><span>contain ( page number, date,) changes that's why they are dynamic. Otherwise if the information was fixed, they would be static elements.</span>
7 0
3 years ago
You are a domain administrator for a large domain. Recently, you have been asked to make changes to some of the permissions rela
Lisa [10]

Explanation:

Since the Austin OU (organization unit) is a descendant of the Texas OU, it naturally inherits the permissions from its parent/ancestors.

Any restriction (permissions removed) from the Texas OU will be inherited onto the Austin OU.  This is exactly the intended purpose of organizing groups in OU's because all changes will automatically inherited within the OU without having to work down the tree.

This can be confirmed by checking with other cities to see if they too have the same restriction.

The proper way the request should have been done is to apply the changes to the most specific unit possible, be that OU's, groups, etc.

7 0
3 years ago
Letter Frequency Write a function that will take a string and return a count of each letter in the string. For example, "my dog
Nostrana [21]

Answer:

Check the explanation

Explanation:

Code to copy:

// ConsoleApplication7.cpp : Defines the entry point for the console application.

//

#include "stdafx.h"

#include <iostream>

#include <cstring>

#include <string>

using namespace std;

int * letterFrequency(char s[]);

int main()

{

  int *freq_letters;

  char *s = new char[100];

  freq_letters = new int[26];

  //To read the input string in order to find the frequency of each letter

  cout << "Enter a string: ";

  cin.getline(s, ' ');

  //call the function to find the occurrence of each alphabet

  freq_letters = letterFrequency(s);

  //Display the count

  cout << "Letter Frequency " << endl;

  for (int i = 0; i < 26; i++)

  {

      //Constriant to check if the letter appeared at least once in the string and so printing the frequency of its occurence

      if (freq_letters[i] != 0)

      cout << " " << static_cast<char>(i + 'a') << " " << freq_letters[i] << endl;

  }

  system("pause");

  return 0;

}

//Define the function to find occurrence of each letter in the input string

int * letterFrequency(char s[])

{

  int *occurrence_array;

//to store the output of occurrences for each alphabet

  occurrence_array = new int[26];

// to store the count of occurrence for each letter temporarily

  int letter_count;

  // for loop to check the occurrence for all 26 alphabets

 

  for (int i = 0; i < 26; i++)

  {

      letter_count = 0;

      for (int j = 0; j < strlen(s); j++)

      {

          /*comparing the ascii values of each alphabet with every character from the string by converting it to lower case i.e. case insensitive*/

          if (int('a') + i == int(tolower(s[j])))

              letter_count++;

      }

      occurrence_array[i] = letter_count;//To store the count calculated for each alphabet

  }

  return occurrence_array;

}

The following below code screenshot and output shows that when the string is entered, the output will shows each lettercount irrespective of whether the letter is in capitals or small and does not count non-letter characters (i.e spaces, punctuations etc.)

6 0
4 years ago
Describe shortly about the following Linux directories and theirpurpose,1. lib2. etc3. Boot4. Root5. home
Bingel [31]

Answer:

 Linux directories and their purposes are:

1) lib - Lib file contained the share object library file which necessary to boots system and this directory contain file module stored in the kernel.

2) etc - etc file is the configuration file that they are local in the machines. When the program run these file are stored in the directories. this can be static and do not executable directory.

3) Boot - Boot file are stored in the directory which required processing of linux boot and such files are included in the linux kernel of the file.

4) Root - Root file are the best user root directory and user cannot view this directories from there account. This file usually contain administrative file system.  

5) Home - Home file contained the user directory and it is the default system of linux. Home directory helps user to enable any network system to access there home directories.

5 0
3 years ago
Other questions:
  • It can be useful to have a mentor because they will help you
    7·2 answers
  • What are features of a product?
    8·2 answers
  • Complete the following table.
    6·1 answer
  • You have just connected a new computer to your network. The network user static IP addressing. You find that the computer can co
    12·2 answers
  • Who created apple and in what year was it created
    9·2 answers
  • Mrs. Schlair has an annual salary of $96,402.<br> a. What would her semimonthly salary be?
    9·1 answer
  • Why optical disk is slower than magnetic disk.?​
    9·2 answers
  • You have been elected to assist the school's yearbook committee and newspaper club in purchasing new computers. The current comp
    10·1 answer
  • One of 34 possible _________________ can be assigned to each axis of classification in the seven-character code.
    12·1 answer
  • scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!