1 hour phone interview with VMWare before thanksgiving for Sr. role.
question on lowest common ancestor of two nodes #236.
I think interviewer was thinking the version where both nodes are present.
When i clarified the question, they said node may or may not be in the tree #1644.
I proposed two solutions, one takes two passes-
first one is to identify if both nodes are present.
second one took single pass and needed extra logic.
Interviewer asked to solve either one. I explained the logic for first solution (two pass), coded and tested it manually via several examples.
I did not think interviewer was able to grasp the code flow regardless of me testing it line by line.
They asked me to write test cases, code a tree and run it.
This was really weird cause interviewers should atleast have some notion of working code. Anyhow, i wasted 10+ minutes of interview hardcoding a tree and writing test cases.
And ran all of them successfully.
Then they asked to explain the single pass solution.
I asked them to give me the tree example again.
I could see person was really strugging copy pasting the tree and eating into my time. Anyhow, i added necessary filler, explained the logic and execution via a few test cases. Then coded the single pass solution.
After this interviewer asked me to run this one in codility.
With all the examples drawn on top, tree etc. there were some compilation issues. Interviewer says, i can not see the output, there are errors.
So I further cleaned up the execution area to compile the code again. They wanted to see the output, and now we are out of time.
We would not be out of time if we had not wasted 10min trying to hardcode a tree and run it in codelity.
My takeaway from this, anyone can find a question on leetcode, check the solution and conduct an interview.
Some coding skills/expertise are required on both sides.
I have successfully done coding interviews at google, fb, apple etc. both phone screen and onsite; so I probably don't need a certificate.
I've solved 1650+ problems on leetcode.
Most reputable places ask for code white boarding and interviewer is skilled enough to know whether it is a working solution or otherwise.
If interviewer wants you to run the code in phone interview, where they just sit back and want to see the output.
It is more productive to just send out an online assessment to the participant.