using System.Numerics; namespace _8._String_to_Integer__atoi_; public class Solution { public int MyAtoi(string s) { if (string.IsNullOrEmpty(s)) return 0; BigInteger res = 0; int index = 0; while (index int.MaxValue) return int.MaxValue; if (res < int.MinValue) return int.MinValue; return (int)res; } }