Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Being an editor of a newspaper, your job is to put such news articles ( NA ) on the front page of the newspaper which
Being an editor of a newspaper, your job is to put such news articles NA on the front
page of the newspaper which attracts maximum readers. To accommodate maximum NA on the front page, it
is usual practice to break the NA into parts and print one partpartition P at the front page and second part
partition P at other page. However, the breaking of the NA may reduce the attraction of the readers. Instead
of random size of partitions, let us fix the size of the partitions for each of the NA as follows:
i and
ii and
iii and
iv and
As an example, Table present the details like, NA id count of characters in NA count of attracted readers if
P and
Considering that maximum characters can be placed at the front page of the newspaper, propose an efficient
greedy based algorithm Need to write pseudocode to place print the NAs on the front page which attracts
maximum number of readers. Also, analyze the running time required by your proposed algorithm.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started