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
Rama09 [41]
3 years ago
15

You are given n sorted sequences each one containing n keys. You may assume n is a power of two. We want to merge them into one

sorted sequence containing all the keys. Assume all of the keys are distince. What is an upper bound on the number of comparisons performed. Provide a multiplicative constant for the most important number and as much as possible for the remaining terms. (Only the result counts.)
Computers and Technology
1 answer:
Galina-37 [17]3 years ago
4 0

Answer:

Upper bound means the algorithm will not use more time than this.

Since there n sorted sequence and having n distinct keys, the upper bound will be :

O(n^2logn) using Min Heap, n^2 because there will be the output of array size n*n

Explanation:

You might be interested in
How does limiting a company's scope benefit the company?
Alika [10]
If a company only focuses on a few things,they become a niche player in the market,therefore can demand a higher price because they are experts at only a few things.
8 0
4 years ago
Read 2 more answers
I bought an iPhone 6s Plus with 16gb three days ago and I found out that it s very little space for my liking and I want to exch
Mashutka [201]
You can return it for a refund, however with that money you will need to pay the difference, as they are different models and the 64gb will cost more.
3 0
3 years ago
Karen works in a department store. Her coworker gave diverse cultural backgrounds. Which statement shows that Karen understand t
Goshia [24]

Answer:

Karen!

Explanation:

hahhahahahhahaahhahahaahahha

she wouldn't understand anything

anyways, where is the statements THEN I'll edit my answer シ

5 0
3 years ago
ABC Resort and Hotel has approached you to write a program to keep track of the number of rooms needed for an event. Customers c
nexus9112 [7]

Answer:

Check the explanation

Explanation:

/ Pseudocode for tracking the reservation of rooms for an event

Declaration

 

  string roomInput;

  string roomNames[4];

  number roomPrice[4];

  number roomCount[4];

  number i;

  boolean roomFound;

  number totalRevenue, avgRevenue;

  number totalRoomsNeeded;

Start

 

  // initialize the room names, and price for each room

  // array index starts from 0 and goes to n-1 where n is the total number of elements in the array

  roomNames[0] = "Single";

  roomNames[1] = "Single Deluxe";

  roomNames[2] = "Double";

  roomNames[3] = "Double Deluxe";

 

  roomPrice[0] = 79.95;

  roomPrice[1] = 99.95;

  roomPrice[2] = 149.95;

  roomPrice[3] = 179.95;

 

  // initialize each room count to 0 at the start

  for(i=0;i<4;i++)

  do

      roomCount[i] = 0;

  end for  

 

  // input the room type, user should type exit to indicate they are done

  Display "Enter room type ('exit' to quit ) : ";

  Input roomInput;

 

  // loop that continues till user types quit

  while(roomInput != "quit")

  do  

      roomFound = false;

      // loop to determine if user input is valid and increment the associated room count

      for(i=0;i<4;i++)

      do

          if(roomNames[i] == roomInput) then

              roomCount[i] = roomCount[i] + 1;

              roomFound = true;

          end if

      end for

     

      // if invalid room type, display error

      if(roomFound == false) then

          Display "Invalid input for Room type. Room type can be Single or Single Deluxe or Double or Double Deluxe ";

      end if  

     

      Display "Enter room type ('exit' to quit ) : ";

      Input roomInput;

  end while

 

  // set totalRevenue and totalRoomsNeeded to 0

  totalRevenue = 0;

  totalRoomsNeeded = 0;

  Display("Room Type Price($) Rooms Needed");

  // loop to display each room type details and calculate the totalRevenue and totalRoomsNeeded

  for(i=0;i<4;i++)

  do

      Display(roomNames[i],roomPrice[i],roomCount[i])

      totalRevenue = totalRevenue + (roomPrice[i]*roomCount[i]);

      totalRoomsNeeded = totalRoomsNeeded + roomCount[i];

  end for  

 

  // calculate average revenue

  if(totalRoomsNeeded > 0) then

      avgRevenue = totalRevenue/totalRoomsNeeded;

  else

      avgRevenue = 0;

  end if

 

  // display the total revenue and average revenue

  Display("Total revenue from all rooms : $",totalRevenue);

  Display("Average revenue from a room : $",avgRevenue);

 

End  

//end of pseudocode

5 0
4 years ago
A personal directory of e-mail addresses stored and maintained with one’s e-mail program
iris [78.8K]

Answer:

It’s a address book

8 0
4 years ago
Other questions:
  • Write a function decimalToBinaryRecursive that converts a decimal value to binary using recursion. This function takes a single
    11·1 answer
  • What is a collection of data that is stored in a computer system
    7·2 answers
  • _______ tags are tiny chips that can be embedded into almost anything and contain information used to track and locate lost pets
    14·1 answer
  • What major criteria must a product or process meet in order to be considered emerging technology?
    6·2 answers
  • Sniffer turns the NIC of a system to the promiscuous mode so that it listens to all the data transmitted on its segment. It can
    5·1 answer
  • You can invoke or call a method from another program or method. When methods must share data, you can pass the data into and ret
    6·1 answer
  • on the road you are traveling,the pavement markings change from broken white lines to solid white lines between the lanes of tra
    5·1 answer
  • Which of the following is a definition of a conventions
    8·2 answers
  • Write a for loop to print all the even numbers from 200 to 300.
    14·1 answer
  • Brenda also orders movies and television through the Internet via a(n) ____ provider, which allows users to download video for a
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!