Dsa
Binary Search
Medium
Minimum Target
You are managing a construction project, and you need to determine the minimum height at which to set a scaffolding to ensure that it is safe for all workers. The heights of all workers are given in a list, and you must find the minimum height that is at least as tall as the tallest worker. The input consists of a single line with space-separated integers representing the heights of the workers. Your program should output the minimum required height. Example:
Input:
150 160 155 170 165
Output:
170
Key concepts
binary_searchoptimizationarray
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now