Earlier quoted context omitted.
Interesting and valid points. I have some things to add. Disclaimer first: I'm a technical interview coach. We run http://InterviewKickstart.com , which provides structured and intense group programs for early and mid-career software engineers, with the sole purpose of preparing for technical interviews. In an ideal world, brushing up is all what it should take before going into interviews. Practicing Software Engine…
> e.g. If they ask you to merge sorted arrays and you don't know that Heap sort is the best way to do it Sorry, I'm confused. I love heaps, but... what's wrong with this simple O(n+m) time and space solution, that I can easily prove is the theoretical limit (because the output size is O(n+m))? def merge_sorted(a, b): result = [] la, lb = len(a), len(b) ia, ib = 0, 0 while ia = lb: result += a[ia:] break if ia >= la:…
http://www.geeksforgeeks.org/merge-k-sorted-arrays/
Merge k sorted arrays. Obviously that's a job for a min heap (not heap sort though, just a heap to keep the values of the next item in each array).