Implement atoi: convert a string to a 32-bit signed integer. Skip leading whitespace, handle an optional +/- sign, read digits until a non-digit, and clamp to [-2^31, 2^31-1].
Input: A quoted string s.
Output: Integer — the parsed value.
Input: "42"
Output: 42
Explanation: Simple integer.Input: " -42"
Output: -42
Explanation: Leading spaces and sign.Input: "4193 with words"
Output: 4193
Explanation: Stops at non-digit.0<=s.length<=200