Google Python Software Engineering Interview: Edit Distance Leetcode Question

preview_player
Показать описание

In this video, Neamah asks Thomas (Google SWE) to create an algorithm to return the minimum number of operations to convert one string into another string, with three operations: insert, delete, replace.

Chapters -
00:00:00 Introduction
00:00:54 Question
00:01:10 Clarifying questions
00:02:20 Answer
00:12:35 Test cases
00:22:00 Follow-up questions
00:24:06 Interview analysis
00:25:44 Tips

Watch more videos here:

ABOUT US:
Did you enjoy this interview question and answer? Want to land your dream career? Exponent is an online community, course, and coaching platform to help you ace your upcoming interview. Exponent has helped people land their dream careers at companies like Google, Microsoft, Amazon, and high-growth startups. Exponent is currently licensed by Stanford, Yale, UW, and others.

Our courses include interview lessons, questions, and complete answers with video walkthroughs. Access hours of real interview videos, where we analyze what went right or wrong, and our 1000+ community of expert coaches and industry professionals, to help you get your dream job and more!

#softwareengineering #google #coding #leetcode #string #tech #entrepreneurship #exponent
Рекомендации по теме
Комментарии
Автор

Great video overall. One thought as a interviewer is to give a concrete example at the time of asking the question. Here is the sample input and here is the sample output. This would be helpful for someone who may have never heard of this problem before.

anasfirdousi
Автор

Great video! One optimization if the words are small: generate all the words with one edit distance from the current word ex: "ax"->{"bx", "cx"..."zx", "aa", ...."aw", "ay", "az"}. Then just add an edge between the current word and any word in the generated list that belongs to the initial set of words. This brings down the time complexity of building the graph from O(n_words^2*word_len) to O(n_words*word_len^2*26). Of course, if the words in the dictionary are large this optimization doesn't make much sense

superamazingguycom
Автор

Just heard the question & haven't watched the video yet. What's the purpose of the dictionary, if we just need to convert word1 to word2?

oganovdavid
Автор

Great video and content. Print is still the most usable debugging tool :)

jinalpatel
Автор

I will try out Exponent interview prep!

newcrossflightz
Автор

Amazing guys thanks a lot for posting videos 🤝😊

philosophia-stoic
Автор

It looked as if he chose stack intentionally in the beginning to illustrate his debugging skills.

devanshgarg
Автор

Quite similar to prime path question on SPOJ

parasmanithakur
Автор

Idk if anyone noticed but the interviewee kept looking on the left side as if the solution was already open on the other window. Please don’t get me wrong. This mock interview process is great but one should get random questions out of a pool and not every interview is a smooth sailing as shown in all the mocks conducted on exponent.
My 2 cents, Pick a random number and select that question from platform like leetcode or hacker rank.

ronakgupta
Автор

who knows the big O of his solution, I feel it is very high since it always loop through all the childs of a node, which can be very time consuming.

kezhan
join shbcf.ru