โ† Virtusa questions
moderate

Nearest smaller tower

Filed under Virtusa

The question

Given an array of tower heights, find the nearest tower on either side that is smaller than the current tower. If distances are equal, choose the one with the smaller height.

No write-up yet. Related questions below have one.

Related Virtusa questions

Collected from public candidate posts and coding forums. Updated Nov 2026.