Computer Science, asked by likithaatummala, 9 months ago

Your company is designing a dam to be built across a stream to
create a smail lake. To reduce materials cost, it will be made of one
or more concrete walls with mud packed in between them.
Determine the maximum height of the mud segments in the dam
with the following restrictions:
One unit width of the gap between walls will contain one segment of
packed mud
• The height of mud in a segment cannot exceed 1 unit more than an
adjacent wall or mud segment.
Given the placement of a number of walls and their heights,
determine the maximum height of a mud segment that can be built,
If no mud segment can be built, return 0.​

Answers

Answered by vasundhrakrishnar
6

Answer:

if you answer this question below then automatically you will get your answer

Your company is designing a dam to be built across a stream to

create a smail lake. To reduce materials cost, it will be made of one

or more concrete walls with mud packed in between them.

Determine the maximum height of the mud segments in the dam

with the following restrictions:

One unit width of the gap between walls will contain one segment of

packed mud

• The height of mud in a segment cannot exceed 1 unit more than an

adjacent wall or mud segment.

Given the placement of a number of walls and their heights,

determine the maximum height of a mud segment that can be built,

If no mud segment can be built, return 0.

Answered by bhavyashekar99
0

Explanation:

The wallPositions =[1,3,7]

Similar questions