Amazon interview question

Q: Given a function with inputs --an array with N randomly sorted numbers, and an int K, return output in an array with the K largest numbers. Q: 1. How does GMM/HMM work 2. Name some dimensional reduction method; I said PCA and we talked a bit about how PCA works and what's the physical intuiation 3. How K-means work, what kind of distance metric would you choose, what if different features have different dynamic range 4. How GMM works (EM algorithm)

Interview Answers

Anonymous

9 Mar 2016

A: The correct answer should be use heap or selection algorithm. But I tried using sorting, which would be more complex.

Anonymous

23 May 2019

Should I expect some ML system designs as well? Thank you for sharing your experience. Wondering have you ever tried Rooftop Slushie for your interview prep? I saw several posts similar to your experience on this community, which was really helpful for me so far. rooftopslushie.com