Python Interview with a VMware engineer.
Python Interview with a VMware engineer
Watch someone solve the linked list intersection problem in an interview with a VMware engineer and see the feedback their interviewer left them. Explore this problem and others in our library of interview replays.
Intersection of Two Linked Lists (Python Interview)
Interview Summary
Problem type
Linked list intersection
Interview question
Return the node that begins the intersection of two linked lists.
Read more about the questions
Interview Feedback
Feedback about Ghost Armadillo (the interviewee)
Advance this person to the next round?
No
How were their technical skills?
2/4
How was their problem solving ability?
2/4
What about their communication ability?
2/4
Strengths:
They were able to come up with an algorithm to solve the problem.
This shows that they were able to wrap their head around the problem and work towards the solution. This also shows they have the nerves to withstand pressure and stress and not lose their focus and cool.Improvements:
Study theory and the basics of data structures and solve simpler + basic problems to gain deeper understanding and build muscle in the area.
Then slowly move to more advanced problem solving.This will require patience and perseverance but I assure you that you are on the right track. Stick with learning the basics and solving simpler problems to reinforce your learning and you will amaze yourself in 6 months time!
I wish you all the best, good luck and success.
Feedback about The Masked Hedgehog (the interviewer)
Would you want to work with this person?
Yes
How excited would you be to work with them?
4/4
How good were the questions?
4/4
How helpful was your interviewer in guiding you to the solution(s)?
4/4
Interview Transcript
Ghost Armadillo: Hello.
The Masked Hedgehog: I can hear you.
Ghost Armadillo: Okay, now I can hear you. Yeah. Cool.
The Masked Hedgehog: Okay, cool. Thank you. Yeah. How's the day going?
Ghost Armadillo: Yeah, good. Thanks. How's yours?
The Masked Hedgehog: My day is also good. Thank you for asking.
Ghost Armadillo: Shall we get started?
The Masked Hedgehog: Yes, please. Yes, I'm ready.
Ghost Armadillo: Are you interviewing me or?
The Masked Hedgehog: Oh, I believe you are interviewing me if I'm not mistaken. Oh, interviewer the Master Hedgehog. Oh, I am the interviewer I guess.
(...)
The Masked Hedgehog: Well said, there's definitely luck involved. So without further delay, what I'll do is I'll ask you to pick a programming language of your choice. It's totally up to you whichever one you want to pick.
Ghost Armadillo: I'll just choose Python3.
The Masked Hedgehog: Perfect. Yeah, that sounds great. And I'll adjust the screen a little bit.
Problem Definition
Your goal is, essentially to implement the function find_intersection, and you will be given linked list one and linked list two, which are basic head pointers. You have to find the intersection node where the two lists intersect. If they do not intersect, you return None.
Key Points
- To find out if two linked lists intersect, compare the memory addresses of the nodes, not just the values.
- Use two pointers to traverse the lists and check for intersections.
- If one pointer reaches the end of its list, switch it to the head of the other list and continue until both pointers meet or both reach the end.
By mastering these techniques and practicing similar problems, you'll improve your problem-solving skills and prepare for future interviews.