Frage im Vorstellungsgespräch bei Zillow

Implement a Priority Queue's insert & dequeue methods.

Antwort im Vorstellungsgespräch

Anonym

20. Dez. 2016

I hadn't planned on doing any interviews for another 3-4 weeks, and I expected a more HackerRank-like problem since it was on HackerRank & from looking at some of the questions on here. Didn't review heaps/PQs. Spent most of the interview trying to remember/work out how a heap works. I remembered the basics: its a binary tree, its complete (i wasn't sure if that was the term for it), you can use an array rather than node objects w/ child pointers. I said a Heap could be used as the PQ. Started writing a heap: the comparator function (for comparing priority of 2 elements), the insert method (I don't remember what exactly I wrote, but I looked up some implementations after the interview, and they seemed conceptually similar). Got the runtimes correct - both are O(log n). Ran out of time before even starting the dequeue method. It was a 45 min interview (with 15 mins or so discussing my current position). Overall experience: Neutral Pro: - The people I talked to on the phone for both pre-screen & tech screen were nice - Zillow does sound like a great place to work in terms of engineering culture & work-life balance Con: - I asked for some time to prep (at least a week, I would have liked 2), but didn't get it. I wasn't able to study much during the time between the recruiter contacting me and the 1st interview due to other commitments. Other companies I've talked to have been fine with it (1 even encouraged me to not schedule it until I thought I was ready). - I think I communicated with 4 or 5 different people during the process which seems like too many considering I only got to the 1st phone screen - Wasn't given a list of topics to study or any guidance on what I might be tested on