Interview Question : Multiply Strings [LeetCode] Python Code

preview_player
Показать описание
Multiplication of Strings With Examples Asked in Microsoft & Google

Follow this Playlist For Important Python Interview Questions:-
Рекомендации по теме
Комментарии
Автор

This video explains in very detail. I would recommend anyone if u still struggle at this concept, please watch this

Bang-dt
Автор

Thanks. The explanation is very clear.

BHARTGUPTABEC
Автор

Thanks for the video and the explanation. You've simplified it as much as possible which is great. One quick suggestion is to talk about runtime and space complexities as well if possible at the end of your videos to help!
My understanding is that the creation of the new list and parsing through that adds to the Space complexity a bit and hence I used your logic but did not convert String to list as it will help save some space when it comes to larger inputs. However, this is an excellent method and example that you have given to make us understand!
Thanks again!

arunprasad
Автор

Nice. Appreciate your work. Keep posting!! Thanks!!!

jaejae
Автор

It also said not to use built in int function to convert string to integer but here we are directly using it and this may b not correct.

PrasoonMajumdar
Автор

I understood the algo in the starting 10 mins . However used dict instead of list. That costed me like 20 ms more, but yeah, an important part is len of final ans <=len(str1)+len(str2). I had an assumption that if might cross that

amitupadhyay
Автор

Hi Mam,

Can you please start a series on file manipulation related questions.I have seen many times in interview questions are asked related to filemanipulation and regexp (Nos of IP's which has maximum nos of hits)
Hope you ll upload soon.

Many thanks

taram
Автор

def multiply(self, num1: str, num2: str) -> str:
mult = num1 + "*" + num2
ans = eval(mult)
return str(ans)

arpanroychowdhury
Автор

Mam can we do this for this question
str1="43"
str2="22"
Res=int(str1) *int(str2)
Print(Res)

MDASIF-umse
welcome to shbcf.ru