An online news website relies on in-page advertisements to make money. Their article pages have multiple slots for advertisements, and each slot can be used for a full-size ad or multiple smaller ads. Advertisers specify their size and desired display count per day. A diagram of a webpage. Article text is shown alongside multiple advertising boxes on the page. The news site uses a scheduling algorithm to determine which advertisements to display in each slot at each time of day. The algorithm's goal is to maximize money earned while not exceeding the display count per day, so it tries out every possible combination and picks the best one. As the number of advertisers and articles increases, the news site realizes the scheduling algorithm is taking an unreasonable amount of time and costing them valuable server time. What is the most promising way that they can improve the run time of the algorithm

Answers

Answer 1

Answer:

Create a dynamic-sized circularly-linked list to hold a tuple of the adverts and the count. As the program runs, the sum of the counts is used to calculate the fixed advertisement time which is saved in a variable time_slot. Then a loop statement should be used to traversal the linked list continuously until the count sum is exhausted for the day.

Explanation:

A circularly-linked list is a linked list with both ends joined together. With this data structure, the continuous traversal of the list is easier and faster. A conditional statement is used in the algorithm to check and decrement the count of each advert and when all is zero or false, the program ends.


Related Questions

what is file management?can please help me​

Answers

is the process of administering a system that correctly handles digital data. also i think it improves the overall function of a business workflow. but this could be totally wrong.
File Management includes common operations performed on files or groups of files, include creating, opening, renaming, moving or copying, deleting and searching for files, as well as modifying file attributes, properties and file permissions

to calculate perimeter of a rectangle​

Answers

a+b+c+d= perimeter of a rectangle

Answer:

A+B+D+C

Explanation:

Just add all the sides together....

Dana frequently joins people in online discussion boards and forums. Which of her habits should she change to maintain proper netiquette?

Answers

Answer:

The correct option is a. correcting others’ spelling and grammar.

Explanation:

Note: This question is not complete as the options are not included. The complete question with the options is therefore provided before answering the question as follows:

Dana frequently joins people in online discussion boards and forums. Which of her habits should she change to maintain proper netiquette?

a. correcting others’ spelling and grammar

b. using a conversational tone

c . breaking large comments into readable paragraphs

d. typing whole sentences with capital letters

The explanation of the answer is now given as follows:

Grammar lessons should not be given in a casual conversation unless the person is a language teacher or has been specifically asked to assist. This indicates that correcting others' spelling and grammar in a normal conversation is often considered impolite. It's simply not polite and a sign of lack of etiquette to criticize the actions of other people when you have not been specifically appointed or when you are not in a position to do so.

Therefore, the correct option is a. correcting others’ spelling and grammar.

Roger wants to give semantic meaning to the contact information, which is at the bottom of the web page. To do this he will use a footer element as a ______ of the contact information.

Answers

Answer:

Parent

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head. The head contains information such as version of HTML, title of a page, metadata, link to custom favicons and CSS etc. The body of a HTML document contains the contents or informations that a web page displays.

In this scenario, Roger wants to give semantic meaning (an element conveying informations about the type of content contained within an opening and closing tag) to a contact information placed at the bottom of a webpage. Thus, in order to do this, he should use a footer element as a parent of the contact information and as such all instance variables that have been used or declared in the footer class (superclass) would be present in its contact information (subclass object).

list = [1,2,3,'a','b','c'] ... write a code to output b * (python)

Answers

Answer:

please tell me if you find the answer i have the same q for my IT med term

Answer:

print(list[4])

Explanation:

Complete breakdown:

The command 'print' shows what command is displayed on the screen

The 'list' shows that Python should print something inside a list

The '4' is the index number of list. Index numbers start from 0 so

'1' - 0

'2'- 1

'3' - 2

'a' - 3

'b' - 4

'c' - 5

A user calls and complains that she cannot access important company files from her personal device. You confirm that Intune policies are properly set up and assigned to her. What could be the issue that is blocking her from accessing the files

Answers

Answer:

A user calls and complains that she cannot access important company files from her personal device. You confirm that Intune policies are properly set up and assigned to her. What could be the issue that is blocking her from accessing the files? The user's device is rooted or jailbroken.

11. Find the output of the following programs:
CLS
X= 7
FOR I = 1 to 10
PRINT X
IF X MOD 2 = 0 THEN
X= X/2
ELSE
X=X* 3+1
END IF
Next I
END​

Answers

Answer:

See picture.

Explanation:

Ran it on repl it.

If you misspell a word in your Java program it may be true that I. the program will not compile II. the program may compile, but not run III. the program may compile and run but still have a logic error

Answers

Answer:

option I

Explanation:

If you misspell a word in your Java program it may be true that the program will not compile

dash is a collection of sequentially arranged slides put together in the from of a file​

Answers

Answer: Presentation

Explanation:

A presentation refers to the collection of sequentially arranged slides that are put together in the from of a file​.

Presentations are used by businesses and professional firms to inform, educate, and persuade the audiences. Companies use presentations to train their employees, and communicate with their clients by using words and images to engage them.

how can the government protect human rights​

Answers

Answer:

governments can: Create constitutional guarantees of human rights. Provide ways for people who have suffered human rights violations by the government to seek legal remedies from domestic and international courts. Sign international human rights treaties.

The bill of rights protects freedom of speech, freedom of religion, the right to keep and bear arms, the freedom of assembly and the freedom to petition.

Select the correct answer from each drop-down menu.
Kawika is a math teacher. His students recently took a test. He has recorded their scores in a spreadsheet, using functions to analyze the scores. Which functions should he use to determine the top and mean scores?

Kawika can use the ____ function to find the top score and the ____ function to find the mean score.

First blank:
1. MIN
2. COUNT
3. MAX

Second blank:
1. AVERAGE
2. ROUND
3. SUM

Answers

Answer:

First blank:  MAX

Second blank:  AVERAGE

Explanation:

Required

Complete the blanks

The first blank is to be filled with a function that calculates the highest score from a given range of scores (cells).

To do this, we make use of the MAX function, and the syntax is:

=MAX(cell_range)

The second blank is to be filled with a function that calculates the mean score from a given range of scores (cells).

To do this, we make use of the AVERAGE function, and the syntax is:

=AVERAGE(cell_range)

Answer:

MAX

AVERAGE

Explanation:

I got it right on the Edmentum test.

define micro computer​

Answers

A microcomputer is a complete computer on a small scale, designed for use by one person at a time. An antiquated term, a microcomputer is now primarily called a personal computer (PC), or a device based on a single-chip microprocessor. Common microcomputers include laptops and desktops.

in school there are 1800 boys and 1200 girls in an exam only 32% of the boys passed and 50% of the girls passed. find the percentage of the total who did not pass. someone pls help me with this you could send it to me by tomorrow pls do it step by step so I can get it thank you​

Answers

Wow same question!!! Nice

If the system has a mechanical advantage of 5 and the load of 350N.What effort is needed to lift the weight? Provide your answer in newtons​

Answers

Answer:

Effort = 70 N

Explanation:

A machine is a device that can be used to overcome a load by the application of a minimal effort. For a practical machine, mechanical advantage (MA) is the ratio of the load (L) overcome to the effort (E) applied.

i.e MA = [tex]\frac{Load}{Effort}[/tex]

In the given question, MA = 5 and the load = 350 N. So that;

5 = [tex]\frac{350}{E}[/tex]

E = [tex]\frac{350}{5}[/tex]

  = 70

The effort applied to the machine is 70 N.

pls help me pass my finals!!​

Answers

Answer:

(a): power(2&-2)

The code is as follows:

power = 2**-2

print(power)

(b): Largest and smallest in a list

The code is as follows:

num = [33,6,11,100,456,109,-4,366]

smallest= min(num)

largest= max(num)

print(smallest)

print(largest)

(c): Loop in Python

(i) Loop are instructions that are repeated until a certain condition is met;

(ii) For loop, in python are used to iterate over a sequence or through a certain range;

The syntax is:

for loop_element in range(iterating_range):

The following is an illustration of for loop that iterates 5 times

for i in range(5):

Explanation:

(a): power(2&-2)

The ** is used to calculate power.

So, 2**-2 represents 2 raise to power -2

power = 2**-2

This prints the calculated power

print(power)

(b): Largest and smallest in a list

This initializes the list

num = [33,6,11,100,456,109,-4,366]

This calculates the smallest using min() function

smallest= min(num)

This calculates the largest using max() function

largest= max(num)

This prints the smallest and the largest

print(smallest)

print(largest)

(c): See answer section

What is Sleep mode? Check all of the boxes that apply.

It is a power-saving mode for a computer.

It puts your work and computer settings in memory while using little power.

It is a power-saving mode designed for laptops.

It is the same thing as Hibernate mode.
The supreme court's ruling in Marbury v. Madison was important because it

Answers

It is a power-saving mode for a computer.

It is a power-saving mode designed for laptops.

The ________ sort usually performs fewer exchanges than the ________ sort. Group of answer choices bubble, selection binary, linear selection, bubble ANSI, ASCII None of these

Answers

Answer:

Answer is C

100% guaranteed.

3. The art or technique of decorating wood or leather by burning a design on the surface
with a heated metallic point.
A. Pyrography
C. Wood Turning
B. Gilding
D. Hand Carving
4. Combines several techniques that involve inserting decorative pieces into a base
object to incorporate new designs on the original products.
A. Flocking Technique
C. Inlying
B.
Hand Carving
D. Gilding
5. Lines the interior of drawers and boxes with a soft velvety finish
A. Flocking Technique
C. Inlying
B. Hand Carving
D. Gilding
6. It is used to color wood to give an illusion of texture. This may come in two varieties.
A. Staining
C. Pigment-based
B. Dye-based
D. Inlaying
7. Stain will color small pores of the wood
A. Pigment-based
B. Dye-based
C. Flocking Technique
D. Painting
8. Stain will color large pores of the wood
A. Pigment-based
B. Dye-based
C. Flocking Technique
D. Painting
9. Decorative technique in which powder is applied on wood or other materials to give a
thin coating of gold from.
A. Inlaying
C. Gilding
B. Staining
D. Wood Carving
10. The simplest way of decorating wood since there are a variety of colors that you can choose from.
One may also add a lacquer finish to make, it shiny and glossy,
A. Flocking Technique
B. Staining
C. Gilding
D. Painting


due tomorrow pls help I'll make brainliest I promise unrelated answer will get reported​

Answers

Answer:

The answer of number three is pyrography.

What are some signs that could help you determine that a date and time was inserted as a special object instead of
typed as normal text? Check all that apply.

Answers

Answer:

i) It is difficult to put the mouse pointer's insertion point in the text

ii) A gray border appear around the time and date when you point to it

Explanation:

When the date and time is pointed to or hovered using the mouse pointer, we have, that the background of the text changes to a grey border around the text when the date and time is inserted as a special object using the insert date and time button on the insert menu in the word processing application

The mouse pointer behaves different when working with some applications, and it could be difficult to place the insertion point of the mouse pointer in the  text

Therefore, the correct options are;

It is difficult to put the mouse pointer's insertion point in the text and

A gray border appear around the time and date when you point to it.

For a processor with primary and secondary caches, an instruction cache miss rate of 1%, a data cache miss rate of 5%, a instruction mix of 40% data accesses, a primary to secondary cache miss penalty of 10 cycles and a secondary cache to main memory miss penalty of 200 cycles and a secondary miss rate of 0.2%, what will be the contribution to total CPI from the cache misses (in decimal)

Answers

Answer:

The answer is "0.306".

Explanation:

The Primary to Secondary Memory Instruction miss cycle

[tex]= I \times 0.01 \times 10 = 0.1 I[/tex]

Data miss cycles[tex]= I \times 0.05 \times 10 \times 0.40 = 0.2 I[/tex]  

The Secondary to main Memory Instruction miss cycle[tex]= I \times 0.01 \times 200 \times 0.0002 = 0.004 I[/tex]

Data miss cycles[tex]= I \times 0.05 \times 200 \times 0.0002 = 0.002 I[/tex]

Total memory stall cycle [tex]= ( 0.1 + 0.2 + 0.004 + 0.002 ) I =0.306 I[/tex]

Is 10 teraflops good? How much does the best PC in the world have?​

Answers

Yeah it’s pretty good. The system, built by Fujitsu for Japan's RIKEN Center for Computational Science, posted a maximum sustained performance level of 442,010 teraflops per second on the Linpack benchmark.

what is the behavior of an element with static positioning in regard to the page layout?

Answers

Answer:

The element is positioned according to the normal flow of the document.

The top, right, bottom, left, and z-index properties have no effect. This is the default value.

The behavior of an element with static positioning in regard to the page layout is that it implies that one put the element in its original position in the aspect of document flow.

What does Static positioning implies?

Static positioning is known to be the normal way that all element have or gets. It implies that one should "put the element into its original place in the document flow as there is nothing special that one needs to see here."

Hence,  the behavior of an element with static positioning is known to be the same and thus If a person do save and refresh, there will be no changes except when there is an updated background color.

Learn more about page layout from

https://brainly.com/question/988590

Fruits, stones and other organic pigments are examples of what?
O Natural materials
O Synthetic materials
O Cultural materials
O Modern art supplies

Answers

Natural materials
Hope this helps

A(n) ________ CPU has two processing paths, allowing it to process more than one instruction at a time. Group of answer choices dual-core bimodal all-in-one dual-mode Flag question: Question 79 Question 791 pts ________ is concerned with the design and arrangement of machines and furniture to avoid uncomfortable or unsafe experiences. Group of answer choices Repetitive strain prevention Ergonomics Positioning Occupational safety

Answers

Answer:

A dual CPU has two processing paths, allowing it to process more than one instruction at a time.

Ergonomics is concerned with the design and arrangement of machines and furniture to avoid uncomfortable or unsafe experiences.

Which tab on the Ribbon contains the command to print a publication?

File

Home

Insert

Page Design

Answers

Answer:

File

Explanation:

Click on the File ribbon and find the print option.

Answer:

File is your answer =)

Explanation:

1. __ and ___ were used in first generation computers

Answers

Answer:

Explanation:

vacuum tubes  and punched cards were used in first generation computers.

I needed help with this answer thanks for your help.

list the three sources of naturally occurring materials​

Answers

Answer:

Flint

granite

sandstone

what is a iteration in program code?​

Answers

Answer:

it's when the code keeps repeating e.g while loop

Explanation:

Which of the following devices might be used to transmit electronic mail? *
1 point
(A) Printer
(B) Monitor
(C) Fax machine
(D) Smartphone​

Answers

I believe it is smartphone because a printer prints, a monitor displays information from a computer(does not control it) and a fax machine well faxs stuff so it would only be smart phone

plants absorb water through root hairs.How do you think this water is used by the plants?​

Answers

Plants absorb water from the soil by osmosis. They absorb mineral ions by active transport, against the concentration gradient. Root hair cells are adapted for taking up water and mineral ions by having a large surface area to increase the rate of absorption.
Other Questions
please help!!!! i really need to get this done List the members of the domain and range in the relation {(2, 8),(3, 27), (4, 64)}.* What can you conclude about these triangles? Checkall that apply.0 Angle E corresponds to angle L.O All corresponding angles are proportional.The measure of angle E is 29.0 The two triangles are similar.The two triangles are congruent. A controversial story comes out in the school newspaper. The number of students who have not heard about the story decreases at a rate that is proportional at any time to the number of students who have not heard the story at that time. There were 900 students who had not heard the story initially, and the number of students is divided by 3 every 4 days. How many students have not heard the story after 7 days? Round to the nearest student. students Stuck? Which of the following statements about scientific theories is incorrect? a.Theories are suggestions made by curious people, b.theories can change if new evidence arises, c. Theories are used to explain why natural phenomena occur, d. theories are bases on sets of hypotheses Which is the best example of a compound?GoldOhydrogen peroxideAirocean water pls asap Can you please help me on this question please omggg The first surprising thing in this chapter is?Chapter 8 of The Wind Master 3. In 1789, the French National Assembly issued the "Declaration of the Rights of Man," based in partonthe concepts expressed in the U.S. Declaration of Independence in 1776. Both documents reflectedthe Enlightenment belief that governments exist to protect the natural rights of citizens. Whatdevelopments in France and the United States attempted to assure the implementation of thisconcept of government?A.B.C.D.Drafting constitutional protectionsRestoring monarchical ruleGaining additional territoryExpanding the slave trade. Calculate the Molar Mass of Radon pentaiodide (Rnls)8573491237 What is the RDA for pantothenic acid? Isotopes with unstable nuclei are __1__ and are called __2__. The __3__ of radioisotopes decay to __4__nuclei plus emission of large amounts of __5__ . The radiation may be alpha, __6__, or gamma. __7__ radiation consists of alpha particles (positively charged __8__ nuclei) that are easily stopped by a sheet of paper. Beta radiation is composed of fast-moving particles, which are __9__. Beta radiation is more penetrating than alpha radiation; it is stopped by __10__. __11__ radiation is electromagnetic radiation. Gamma radiation has no __12__ or electrical charge. It is extremely penetrating. __13__ bricks and __14__ reduce the intensity of gamma radiation but do not completely __15__ it. if every atom of an oxygen has 8 protons in its nucleus what is the atomic number of oxygen 3. On lines 9-12, it states, "They turned the pages, which were yellow andcrinkly, and it was awfully funny to read words that stood still instead ofmoving the way they were supposed to - on a screen, you know." Whatcan the reader most reasonably infer about the book based on theselines? A. The book is printed on decorative, colored paper.B. The book is very different from the books Margie and Tommy are used to.C. The book is very old.D. Both B and C if c. p =rs 100, profit =rs 5, then find profit percent One day, the hours without daylight in a particular city was 17 3/4 hours. What was the number of hours of daylight? PLS help me ASAP! Sharon started driving on the highway in the morning. The equation m=60h represents the number of miles, m, that Sharon has driven on the highway in h hours. Four other cars are on the same highway. click on all the graphs that represent cars moving faster than Sharon's car. help me please (3) 20 points Please help, will mark brainiest! From the top of a cliff 8 metres high,two boats are seen in a direction due West. Find the distance between the boats if their angles of depression from the top of a cliff are 45 degrees and 30 degrees. Find also the actual distance the further boat from the top of the cliff.