subject

There are N rectangular buildings standing along the road next to each other. The K-th building is of size H[K] × 1. Because a renovation of all of the buildings is planned, we want to cover them with rectangular banners until the renovations are finished. Of course, to cover a building, the banner has to be at least as high as the building. We can cover more than one building with a banner if it is wider than 1. We can order at most two banners and we want to cover all of the buildings. Also, we want to minimize the amount of material needed to produce the banners. What is the minimum total area of at most two banners which cover all of the buildings? Write a function: class Solution { public int solution(int[] H); } that, given an array H consisting of N integers, returns the minimum total area of at most two banners that we will have to order.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 17:00
What does the faves button do? a. users mark a web page as a favorite b. leads other readers to favor a specific page c. readers sort and align their favicons, or favorite icons d. leads users to a message board where they can post questions
Answers: 1
question
Computers and Technology, 24.06.2019 08:00
Arah has entered data about football players from team a and team b in a worksheet. she enters names of players from team a with details about each player in different columns of the worksheet. similarly, she enters details of all the players from team b. which option will her view the data for team a and team b in two separate sections after printing? a. page break view b. freeze pane view c. split screen view d. full screen view e. zoom out view
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
George heard about the benefits of a data warehouse. he wants to try implementing one for his organization. however, he is afraid that transferring data to the data warehouse will affect transaction time. which element ensures that transactions are not affected when moving data to a warehouse? when data is transferred to a data warehouse, the a area frees the source system to continue transaction processing.
Answers: 2
question
Computers and Technology, 24.06.2019 18:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best-suited for this?
Answers: 1
You know the right answer?
There are N rectangular buildings standing along the road next to each other. The K-th building is o...
Questions
question
Mathematics, 24.09.2019 23:50
question
Mathematics, 24.09.2019 23:50
question
Social Studies, 24.09.2019 23:50
question
Mathematics, 24.09.2019 23:50
question
Mathematics, 24.09.2019 23:50