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
dimaraw [331]
3 years ago
14

Suppose an initially-empty queue Q has performed a total of 32 enqueue operations, 10 front operations, and 15 dequeue operation

s, 5of which generated EmptyQueueExceptions, which were caught and ignored. What is the current size of Q?
Computers and Technology
1 answer:
Natasha_Volkova [10]3 years ago
6 0

Answer:

22

Explanation:

1. We are going to have at hand 32 Enqueue Operation, with 10 from front and 15 dequeue and 5 empty queue operation

2. You dequeued total number of 15-5 =10 elements since 5 dequeue did not change the state of the queue, so invariably 10 dequeue is done.

3. Next is to enqueued a total of 32 elements.

Enqueue Operation do not change the state(and Size) of the queue, and can be ignored.

4. To arrive at the Total Size of queue, we will have 32-10 = 22 at the end

Answer : 22 because its a 5 dequeue Operations.

You might be interested in
The following are reasons why many organizations are trying to reduce and right-size their information foot-print by using data
blagie [28]

Answer:

C.<em> improve data quality and reduce redundancies, reduce increased and staggering storage management costs</em>

<em></em>

Explanation:

Excess data retention can lead to retention of redundant and irrelevant data, which can reduce data handling and processing efficiency, while at the same time increasing the cost of data storage and management. This can be curbed be reducing data to the right size by using data governance techniques like data cleansing and de-duplication

6 0
3 years ago
Use the Date object and the Array object to determine and diplay information about the current date on your webpage. Your output
Mnenie [13.5K]

Answer:

  1. var today = new Date();
  2. var dateComp = [];
  3. dateComp[0] = today.getDate();
  4. dateComp[1] = today.getMonth();
  5. dateComp[2] = today.getFullYear();
  6. switch(dateComp[1]){
  7.    case 0:
  8.        console.log("Jan " + dateComp[0] + "," + dateComp[2])
  9.        break;
  10.    case 1:
  11.        console.log("Feb " + dateComp[0] + "," + dateComp[2])
  12.        break;
  13.    case 2:
  14.        console.log("Mar " + dateComp[0] + "," + dateComp[2])
  15.        break;
  16.    case 3:
  17.        console.log("Apr " + dateComp[0] + "," + dateComp[2])
  18.        break;
  19.    case 4:
  20.        console.log("May " + dateComp[0] + "," + dateComp[2])
  21.        break;
  22.    case 5:
  23.        console.log("Jun " + dateComp[0] + "," + dateComp[2])
  24.        break;
  25.    case 6:
  26.        console.log("Jul " + dateComp[0] + "," + dateComp[2])
  27.        break;
  28.    case 7:
  29.        console.log("Aug " + dateComp[0] + "," + dateComp[2])
  30.        break;
  31.    case 8:
  32.        console.log("Sept " + dateComp[0] + "," + dateComp[2])
  33.        break;
  34.    case 9:
  35.        console.log("Oct " + dateComp[0] + "," + dateComp[2])
  36.        break;
  37.    case 10:
  38.        console.log("Nov " + dateComp[0] + "," + dateComp[2])
  39.        break;
  40.    case 11:
  41.        console.log("Dec " + dateComp[0] + "," + dateComp[2])
  42.        break;
  43. }

Explanation:

The solution code is written in JavaScript.

Firstly, create a Date object (Line 1). The date object will automatically capture the current date and time.

Next create an array dateComp to hold the day, month and year (Line 3 -5). We use the getDate method to get current day, getMonth method for current month and getFullYear method for current year.

This is important to note that the getMonth method will return the value range from 0 - 11 with the Jan is represented as 0, Feb is 1 and so forth. Presume we intend to display the date using the format "month day, year", we can create a switch structure to check the month value which is range from 0 to 11. If month value is 0, generate string Jan + current day + "," + current year. We generate the date string based on different switch cases (7 - 44). We shall see the output similar to the date string as shown below:

Apr 12,2020

6 0
3 years ago
What is the magnitude of the largest positive value you can place in a bool? a char? an int? a float? a double??
Elena L [17]
The <span>magnitude of the largest positive value you can place in a bool, a char, an int, a float, a double are as follows:

</span><span>Int: 4 bytes Float: 4 double: 8 char: 1 boolean: 1
</span>
I hope my answer has come to your help. God bless and have a nice day ahead!
8 0
3 years ago
Subcribe to me for brainly my YT is KeepUsweatin
Flura [38]

Answer:

Ok got you. Will do so. Mine is Phantom Pac.

5 0
2 years ago
What is segmentation and paging?
iogann1982 [59]

Over the years, operating systems have sought to be more efficient, which is why it is vital that the use of main memory such as ram be as intelligent as possible, so that operating systems are more efficient.

Segmentation is a process of dividing the program into logical units, such as sub functions, arrays, variables, etc., making it possible to have processes divided into pieces so that it is easy to access each of the processes that this leads to its execution. Segmentation allows the programmer to contemplate the memory as if it had several address spaces or segments. References to memory consist of an address of the form segment number - offset.

Pagination is a technique where memory space is divided into physical sections of equal size, called page frames. The programs are divided into logical units, called pages, that are the same size as the page frames. In this way, an information page can be loaded in any page frame. The pages serve as an information storage unit and transfer between main memory and auxiliary or secondary memory. Each frame is identified by the frame address, which is in the physical position of the first word in the page frame.

8 0
2 years ago
Other questions:
  • Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from great
    8·1 answer
  • You are going to be installing a videoconferencing system. One of the requirements of the system is that only workstations that
    10·1 answer
  • What kind of energy transformation occurs in a gasoline-powered car?
    14·1 answer
  • Tools, documents, language and processes—these are examples of boundary objects. Which of the following is the best definition o
    11·1 answer
  • All portions, to include subject, title, paragraphs, sub-paragraphs, graphics, tables, charts, and bullet statements, must be pr
    12·1 answer
  • Which is the correct option?
    6·1 answer
  • Note that common tasks are listed toward the top, and less common tasks are listed toward the bottom. According to O*NET, what a
    14·1 answer
  • What's the difference between a robot and a machine?
    7·1 answer
  • Differentiate between patent and copyright.
    6·2 answers
  • What is the basic body structure of html.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!