"which merges two sorted arrays without allocating any additional memory. Aside from having no real-world value, it's not actually possible, and his solution code clobbered most of the data in the first array."
This is referring to me.
The author has misrepresented the truth.
(1) The problem does not state that you may not allocate additional memory; only that the memory allocated must be constant relative to the size of your input.
(2) Given #1, this problem is absolutely possible.
(3) The problem explicitly asks you to merge the two arrays "in place". If by "clobbered" you mean changed, then that means that by definition one of the arrays will be "clobbered". We can certainly have a separate conversation about whether modifying structures in place is a good coding practice, but it is generally more efficient and highly widespread in non-functional languages.
I'm sure it wasn't purposeful, but I'm disappointed that the author misrepresented our conversation to make a point. Separately:
(4) This problem is extremely applicable to real-life programming IMHO. It does not use any esoteric data structures. It does not use any complicated algorithms. All you need to do is iterate through two arrays at the same time. A great majority of candidates have solved this problem.
In general I agree with this post's thesis. Facebook's general philosophy with interviews is to allow each interviewer to ask whatever questions they want, and the consequence is a variance in the type of questions getting asked. However, based on internal conversations I know that Facebook is trying to move away from "puzzle" questions by explicitly "retiring" a number of questions that we consider to be unproductive.
This is referring to me.
The author has misrepresented the truth.
(1) The problem does not state that you may not allocate additional memory; only that the memory allocated must be constant relative to the size of your input.
(2) Given #1, this problem is absolutely possible.
(3) The problem explicitly asks you to merge the two arrays "in place". If by "clobbered" you mean changed, then that means that by definition one of the arrays will be "clobbered". We can certainly have a separate conversation about whether modifying structures in place is a good coding practice, but it is generally more efficient and highly widespread in non-functional languages.
I'm sure it wasn't purposeful, but I'm disappointed that the author misrepresented our conversation to make a point. Separately:
(4) This problem is extremely applicable to real-life programming IMHO. It does not use any esoteric data structures. It does not use any complicated algorithms. All you need to do is iterate through two arrays at the same time. A great majority of candidates have solved this problem.
In general I agree with this post's thesis. Facebook's general philosophy with interviews is to allow each interviewer to ask whatever questions they want, and the consequence is a variance in the type of questions getting asked. However, based on internal conversations I know that Facebook is trying to move away from "puzzle" questions by explicitly "retiring" a number of questions that we consider to be unproductive.