Showing posts with label Case study-word ladder-find all paths. Show all posts
Showing posts with label Case study-word ladder-find all paths. Show all posts

Thursday, November 7, 2019

Case study: Word ladder - find all paths given source and destination words

Nov. 7, 2019

I like to write a short case study for Nov. 6, 2019 mock interview as an interviewer.

Python code is the following:
End of python code

Saturday, October 26, 2019

Case study: Word ladder - find all paths

Oct. 26, 2019

Introduction


It was my mock interview at 10:00 PM on Oct. 25, 2019. The interviewee is very experienced engineer, with Google onsite and coming Facebook onsite interview. I like to learn how she wrote the algorithm bug free, and also I like to learn how she trains herself using Leetcode.com. She only solved around 200 algorithms on leetcode.com.

Case study


I like to write the idea using C# as well later. Here is the transcript with the code.



Tuesday, October 22, 2019

Case study: Word ladder - find all paths

Oct. 23, 2019

Introduction

It is not a big surprise for me to learn how talent an interviewee can be. I have not written in JavaScript long time, maybe more than two months, and even I write JavaScript, I do not have chance to write a lot of code. I just could not believe that the interviewee wrote bug free code, and it only took her 28 minutes to write everything, and we also had discussion on various topics like time complexity,and all other things.

Case study

I like to play the mock interview again, and then I can learn from the interviewee better after the mock interview. I learn how to perform better as the interviewee did on her mock interview.

Sometimes it is such great learning experience as an interviewer.


Mock interview transcript starts here
end transcript

Saturday, October 19, 2019

Case study: Word ladder - find all paths

Oct. 19, 2019

Introduction


It is my 10:00 PM mock interview. I like to write a blog and conduct a short case study.

Case study


Here is the code written in python. No bug, executable code.


Actionable Items

It is such great experience to work with a person with 700 algorithm solved on Leetcode.com. No bug, and perfect structured interview. Top 10% rating on interviewing.io. I just could not believe that I will work hard and push myself hard to improve next 6 months. 

300 algorithm to work on, each month 50 algorithm. Each week only 10 algorithm. 

Tuesday, September 24, 2019

Case study: word ladder find all paths

Sept. 24, 2019

The interview lasted one hour 7 minutes, the first 50 minutes or so the interviewee worked on the algorithm. We had some discussion about how to improve the algorithm.

The interviewee went to Google, Amazon, Uber and Microsoft onsite. He also showed how to run the code using pseduo code. It is such a good learning expereince for me.

Transcript starts from here.


End here

Monday, September 23, 2019

Case study: Word ladder find all paths

Sept. 23, 2019

Introduction


It is my mock interview as an interviewer. I just could not believe that the interviewee had super good performance, he wrote the code and tested the code, no bug, executable code.

Case study


Let me show the code I reviewed.
End of python code

Here is my feedback as an interviewer.


Here is the feedback from the interviewee.



Tuesday, September 17, 2019

Case study: word ladder - find all paths

Sept. 17, 2019

Introduction


It is my 10:00 PM mock interview. I like to explore the algorithm and learn from all kinds of mistakes related to the algorithm.

Case study


Here is the transcript.

Actionable Items


I am very experienced to help interviewee to reduce anxiety. Usually at the very beginning, I will say that "I will ask you a graph algorithm. If you need hint, please let me know. Otherwise, we can move to an easy one, tree algorithm.". 

Also I need to find ideas to encourage the discussion, cover basic needs in terms of implementation, like path variable need to design remove action besides insertion. 

I should have spent 10 more minutes to break  the ice after the coding session, encourage the exchange of ideas, how to learn and work on algorithm problem solving in general. 


Case study: Word ladder - find all paths

Sept. 17, 2019

Introduction


It is very good learning experience for me. I met a talented young software engineer who wrote perfect solution in 45 minutes mock interview on Sept. 16, 2019. I like to write a short case study, what we discussed after the coding session, stack overflow, the longest path and concern of stack overflow.

Case study


Here is the page to contain the code written by the interviewee in Java programming language.


Actionable Items

I find that one thing is common. Very competitive software engineer is very independent. The interviewee likes to test the code using web compiler on interviewing.io, make sure that the code runs perfectly.

I also am surprised that they have super talent to come out the test case, and make the test cases more complete; and the interviewee tests all those test cases.

I just observe and learn from the interviewee when they do that.


Friday, September 13, 2019

Case study: 126 Word ladder II - simple version - find all paths

Sept. 13, 2019

Introduction


It is my 10:00 PM as an interviewer on interviewing.io platform. I spent 42 minutes to interview the interviewee using word ladder II simple version, find all paths. It is learning experience for me as an interviewer, and also I like to explore the algorithm as an interviewer. It was exciting and I was so happy to learn from the mistakes, bugs written.

Case study


Here is the transcript.


My feedback


I did point out the challenging part to apply BFS, how to store so many intermediate paths, what is space complexity concern.

After 30 minutes, I also reviewed the code, and ran test case, and then pointed out the problem to store two paths in one variable.


Sunday, September 8, 2019

Case study: 126 word ladder II

Sept. 8, 2019


Introduction


It is so easy for me to be humble and learn from the interviewee. I met a young engineer who went to Google onsite recently, and she showed me the solution how to solve word ladder II (a simple version) on August 16, 2019. She demonstrated such great thinking process, compared to mine, I was so humble to learn that she is much better engineer. She is young, less than five year experience, work for Intel. It is almost one month, I had chance to review her code again.


Case study


I like to write down her code, and then review her performance. I need to think about how to work on my problem solving issues. I should work on my analysis part, make it work first, and then make it optimal next.


Actionable Items


I should learn from the interviewee. She worked hard and also she spent time to test the code, she added a few words in dictionary, and then there are two paths from source to destination word. To exhaust all possible options to replace one char, first for loop is always to start from 0 to last one.

I wrote C# solution using same idea. Here is the folder, here is my C# code.


Folow up 


Sept. 17, 2019

One thing I learn from the interviwee is that those engineers working in Intel are super hard working. They all communicate very often, and they know the standards very well related to Google and Facebook onsite interview. They all are hard working, and they will try to run the code as fast as possible, and then make sure the code passes all those test cases.

At the very beginning, she already talked about all concerns about dictionary, how big the dictionary. The graph algorithm is so popular, and she demonstrated good understanding basics as well.