Meta E5 onsite - totally unprapared interviewer for coding

Meta E5 onsite - specialist role (computer vision)

(note: I passed 11/13 coding interivews with 7-8 different companies in the last 6 months, these are the only two ones I failed)


Screening - ok

Behavioural - passed
System design 1 + 2 - passed
Coding round 1 - passed

Coding round 2:

I get an easy (Toeplitz matrix).

I solve it with diagonal traverse in about 2 minutes - a bit more complex as the matrix is passed as array.
When I realize it's the case, I spend a few minutes trying to solve on the array directly instead the 2D matrix. The interviewer stops me saying I can still index the array as if it was the matrix.

Once I am done writing the solution, he crosses arms and say "this is slow, we want it to be faster".
I point out that we can't do better than O(N*M). "We want it to be faster". I panick. "How do you validate this"? I say I can run through a couple of sample inputs. "No in that sense, how would you validate a matrix without code"?
Turns out he wanted me to implement a horizontal traversal directly on the array shape, which I was trying to do and then I got stopped. The second question (sparse dot product) I solved in 5 minutes. Rejected.

Since I got very good feedback from the other sessions, I am scheduled for a follow-up.

The interviewer postpones it on the day before the session for almost 2 months.

When she gets there, late, she clearly opens the list of questions in front of me for the first time and starts writing "you have two sparse vectors...".
Suprised, I ask if she just wants me to perform a dot product between two single vectors.
I type down def DotProduct(v1: list[int], v2: list[int]) -> int: she says yes.
She adds that she does not want hashmaps.

I start writing down the [idx,val] array solution, when I realize that I don't need to encode the arrays if I only have two. I implement the dot product the simple way and tell her that, if you only have two vectors, there is no benefit in incoding them, you'll still need O(N) time.
She shakes her head and says no, you can do this faster, you don't need to run all the products. I keep reckoning on the problem and insist that, with only two vectors, you will still be driven by the encoding asymptotic time which is O(N). I ask if I am getting two lists of integers. She says yes. I ask if I am supposed to write only one function as I typed above, she says yes.
We spend about 15' total in this empasse (there is no better solution than O(N)) with her shaking her head with arms crossed, when she realizes her mistake "oh, actually yes, you have to encode the arrays first".
There I am totally panicked and spend some minutes writing down the correct solution.

Second question: buildings with sea view.

I solve this in ~30' (very simple question).
She looks at the code and says "something is missing".
I check my code, it works. I ask if I should run an example. Say says no.
I look at my code for 5 minutes, it works. I ask "maybe I should check for invalid input?". She goes yeah, a building cannot have negative height, right?
I point out that, if you initialize a min value with 0, negative and zero values will not have any effect. She seems confused "you should still check". I write down the logic for negative numbers.
"You are missing something else". Apparently I should also have check for zero values.
She closes the interview saying she's not convinced of the indexing I used "never seen it".
It was range(l-1,-1,-1), I explain that is python standard for backwards indexing. "ok".

Rejected because it took me to long to derive the dot product code.

Both the coding rounds I failed were with juniors.
All my other round were with seniors and all were absolutely interesting and fun, if I deviated a bit from the expected answer I would get guidance, not crossed arms and headshakes.
If you are interviewing with Meta beg you don't stumble on these people, actlually do your best to get an experienced engineer for your round if you can.

Good luck!

Comments (1)