LeetCode: String To Integer (atoi)

preview_player
Показать описание
This video discusses the solution to the following problem on LeetCode:

8. String to Integer (atoi)
Implement atoi which converts a string to an integer.
-----------------------------

Join our 30-days online course to prepare for coding interviews of companies like Google, Amazon, Facebook, Microsoft, etc.

We have our office in Greater Noida (India) where we run courses for students to prepare them for placements in Top IT companies. For Placement Preparation and Industrial Training call us.

Call: +91-8377803450

Call us to conduct a workshop in your college campus.

Buy our books and prepare for coding interviews on your own.

For detailed discussions on Interview Questions visit:
Рекомендации по теме
Комментарии
Автор

it should be num = num * 10 + ( str[i] - '0' )

shivabansfore
Автор

7:50 to 8:00 not under stood please help

happysharma
Автор

The condition inside if statement in the for loop trips me😵‍💫

-bit
Автор

Don't follow this tutorial ... his algorithm is wrong

AbidAhsan-ypdc
Автор

if its easy why is your algorithm giving wrong answer??!

piyushdasila
Автор

Hated this problem so much. Can't figure out why +-42 does not work. Very dumb problem

TheSmashten