Search⌘ K
AI Features

String to Integer (atoi)

Try to solve the String to Integer problem.

Statement

Write a function, myAtoi(string s), that converts a string to a 32–bit signed integer. It is equivalent to the atoi function in C/C++.

The myAtoi function reads the input string, s, from left to right for the ...