Google Interview Question for Software Engineer / Developers
- 0of 0 votes
Let’s say you are given with n electricity poles in a line. Each pole i has a flexible varying height from 1 to maximum MaxHeight(i) .- deb~ August 17, 2022 in India
MaxHeights are defined in a separate array MaxHeight[1...n].
These poles can vary their size (expand to max height / shrink to lowest height 1) at any time.
You need to write code to find out the length of wire you would need to connect all these poles from top,
such that no matter how much is the current height of each pole, the wire should be able to connect all these poles from top.
What is the minimum wire length required to sufficiently connect these poles from top in any configurations of poles ?
| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer