String Processing in Python: String to Integer

preview_player
Показать описание
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:

This video is also part of an "Algorithm" series. For more algorithm tutorials:

The software written in this video is available at:

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:

If you've found this video helpful and want to stay up-to-date with the latest videos posted on this channel, please subscribe:
Рекомендации по теме
Комментарии
Автор

Please keep up the content, I am learning so much from these videos!

MrTheBroMoe
Автор

I saved it offline to do it practically ...
Explained very nicely

subhashchaudhary
Автор

i've never seen this type of content with such a great explaination.
Thanks a lot man
you really deserve respect🙌

i know you've been working on some project during the past couple of months. which is good, best wishes to you

but is there any chance that you'll gonna make Data Structure and Algorithm videos.
please let us know

mightyprogrammer
Автор

Sir we want more data structure which are useful in programming interview....
Thanks your videos are amazing....

shahzan
Автор

crystal clear explanation, thank you so much

Sachin-tkog
Автор

Another awsome series have been done ^-^ thanx
for your efforts

louielogn
Автор

Hi, first of all great content. Also, are you planning to expand algorithm topic going foward?

edgarjeparchin
Автор

Why did u stop uploading these are veryy helpful tutorials?
Pls upload more content 🙏😇

polavarapuvinayrahul
Автор

Done with your algorithms series, when are new videos coming can you please give an update, eagerly waiting !

shonnoronha
Автор

num="123"
num=list(num)
def strtoint(num, s):
if s==len(num):
return int(num[s-1])
else:
num[s]=int(num[s])
strtoint(num, s+1)
for m in range(len(num)):
num[m]=str(num[m])
return int("".join(num))
print(strtoint(num, 0))
Can i solve it using recursion(i made use of built-in functions in this code, sr about that)

khaihoang
Автор

hopping to have new algo playlist with a other content ( sliding window,

ahmedelmawrdy
Автор

how to convert 'W1234' into int. number should be extracted.

technologs
Автор

Its unfair: we are still cheating .we do not use int built in function but so easily use 2 built in functions instead:ord and char!
What do i offer? Break it down to the molecular level and create a dictionary of 10 first digits with corresponding number keys .thus you really break it d down.

alexkhalamsky
visit shbcf.ru