Second max element in linear time and constant space
Filed under Grab
The question
Write production-ready code to find the second maximum element in an array using linear time and constant space.
No write-up yet. Related questions below have one.
Related Grab questions
Collected from public candidate posts and coding forums. Updated Nov 2026.