String Processing in Python: String to Integer

August 10, 2018 comments 143 Reads

In this video, we will be solving the following problem:
You are given some numeric string as input. Convert the string you are
given to an integer. Do not make use of the built-in “int” function.
Example:
“123” : 123
“-12332” : -12332
“554” : 554
etc.
This video is part of a series on string processing and, specifically, on how these problems tend to show up in the context of a technical interview:
http://bit.ly/lp_string
This video is also part of an “Algorithm” series. For more algorithm tutorials:
http://bit.ly/lp_algos
The software written in this video is available at:
https://github.com/vprusso/youtube_tutorials/blob/master/algorithms/string_processing/str_to_int.py
Do you like the development environment I’m using in this video? It’s a customized version of vim that’s enhanced for Python development. If you want to see how I set up my vim, I have a series on this here:
http://bit.ly/lp_vim
If you’ve found this video helpful and want to stay up-to-date with the latest videos posted on this channel, please subscribe:
http://bit.ly/lp_subscribe