I was reached out by a recruiter after initial phone call with the recruiter the phone screen was setup. I was already aware that there will be two questions asked so I didn't spend too long with intros and I was sort of done with the intros within 2 minutes (the interview started at the exact time). First questions merge three sorted arrays. Arrays can have duplicates but the output should not have any duplicates. I explained the interviewer the two approaches (using a heap/priority queue and three pointers) obvious choice was to go with three pointer approach. I was done with coding the solution in under 5 minutes - then the interviewer asked me to dry run the code (I was never asked to actully compile and run the code). The reason he asked me was because I never wrote the part to exclude duplicates. This was because I never read the question. I fixed my mistake but over looked an edge case. He pointed that out to me and I was able to fix it.
Second question - given a binary m * n matrix where 0s is a passable and 1s are an obstacle - find a path from (0,0) - (n-1, m-1). I initially said it's a DP problem which he quickly caught and I instatly mentioned that it wasn't correct and infact it's traversal problem and either DFS or BFS could be used. I then proceeded with DFS approach. I wrote the code pretty quickly again. He then asked me to look at my code and see if there were any edge cases I was missing. I couldn't find any so pointed out - what if the matrix was null. I realized it and quickly fixed it. He then mentioned another mistake in my code where I was changing the value used to mark a cell visisted to unvisited and told him that I was already thinking that this was incorrect and fixed the code.
I have heard that missing out on edge cases and making such mistakes are grounds for failure so I will out pretty soon how it goes.