Maximize (nums[i] - 1) * (nums[j] - 1) over two different indices of an integer array
Company: Samsung
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: easy
Interview Round: Other
Overview: Given an array of positive integers, choose two different indices and return the largest possible value of (nums[i] - 1) * (nums[j] - 1). The problem tests reasoning about how a product grows with its factors, handling repeated values at different positions, and writing a single linear scan.