Search
⌘K

Leetcode 8. String to Integer (atoi)

Parse a string into a 32-bit signed integer by skipping leading whitespace, reading an optional '+'/'-' sign and the following contiguous digits (stopping at the first non-digit), and returning 0 if no digits are read; clamp the result to the 32-bit range [-2^31, 2^31−1] on overflow.

Asked at:

Netflix

Microsoft

Microsoft

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late April, 2026

Microsoft

Microsoft

Senior

String to Integer (atoi)

Early February, 2026

Netflix

Senior

Early August, 2025

Meta

Senior

Your account is free and you can post anonymously if you choose.