Questions d'entretiens - Algorithm engineer

475

Questions d'entretien pour Algorithm Engineer partagées par les candidats

Principales questions d'entretien

Trier: Pertinence|Populaires|Date
Hudson River Trading
On a demandé à un Algorithm Developer...13 octobre 2015

If I have a jar with 1000 coins and one is double headed and I pick one coin randomly and flip 10 heads what is the probability it is the double headed coin?

4 réponses

You can use Bayes to get the real number, which is close to 0.5 (which you can see intuitively) . They wanted the exact number. Moins

@ Feb 4, You formula is correct, looks like typo. because 2^10=1024 so 1/(1+999/1024) ~= 1/2 (1*1/1000)/(1*1/1000+(1/2^10)*999/1000) Moins

Bayes. 10^-3/(10^-3 + 1/2^10 * (1-10^-3))

Afficher Plus de réponses
Hudson River Trading

Pretty much the same thing as the Microsoft one in this link. I wasted too much time on question 2 and didn't get a chance to submit an answer but I finished it for fun after the test. https://webcache.googleusercontent.com/search?q=cache:KocTw550s_UJ:https://leetcode.com/discuss/interview-question/760379/Microsoft-or-OA-2020-or-Word-Machine+&cd=1&hl=en&ct=clnk&gl=ru&client=safari

4 réponses

what was your aggregated total score? it shows on the codility report page like 30min after you finish Moins

37 aggregated total score

yea codility is such bullcrap, i got all of them right on the surface, but i ended up with 78 agg score. they need to use hackerrank or something, codility just hides too much and we can't even see what we're doing wrong smh Moins

Afficher Plus de réponses
Hudson River Trading

Asked how to find the kth largest element of a sequence of n elements.

3 réponses

First algorithm: sort the sequence in O(n log n) time and select the kth element. Second algorithm: construct a max-heap out of the n elements, which can be done in O(n) time and then repeatedly remove the largest element until you reach the kth element. This step takes O(k log n) time and so overall the algorithm runs in O(n + k log n) time. Third algorithm: Use quick select: partition the sequence using a random element as the pivot and recurse on the partition that contains the kth element, which you can determine based on the sizes of the two partitions. This runs in expected time O(n) and runs with high probability in O(n) time. It is also possible to extend this algorithm to run deterministically in O(n) time (see Deterministic Selection algorithm). Moins

The third algo is O(n)

we can maintain a min-heap of size k, each time if new element is larger than min element in the heap, remove the root and heapify, otherwise don't update Moins

Apple

How do you find the pdf of the sum of two independent random variables?

3 réponses

Two integrals along the joint distribution of the the two random variables.

Computing the convolution of the pdf of both random variables.

Hey! Thanks for sharing your experience. I have this interview at the location, can you please tell more about the onsite questions? It will be great if you could kindly tell about the questions focusing on coding(was it all in C?), DSP, image processing and ML. Moins

Apple

Homework: Derive group delay of a non linear phase filter Write a program to shuffle cards in a particular manner until original order of cards has been reinstated.

2 réponses

Hey I have this interview at the location, can you please tell the questions? It will be great if the Anonymous poster could tell the questions at on-site if he/she gave that. Moins

hey!, I have this interview too...Can you please tell more about the 8 questions he asked? Moins

Hudson River Trading

Spaghetti in a bowl question. (Pick up one end of a spaghetti and you can either join it to the other end of the spaghetti you are holding which created a loop or you can pick any other end in the bowl and join it to that. Find the expected number of loops.) Another spaghetti question (I think the interviewer loved spaghetti): You have a plate of spaghetti in front of you (no sauce!). You pick two ends and tie them together. Then you pick two more ends and tie them together. Continue until there are no free ends left. If there were n spaghettis originally, what is the probability that you now have a single giant loop consisting of all the spaghettis?

2 réponses

^ how does this comment help anyone?

Standard question. Just google it. I had seen this question while practicing some questions on the internet before the interview. Moins

Hudson River Trading

X,Y are iid standard normal. what P(Y>3X)

2 réponses

More details: P(Y > 3X) = P(Y > -3X) = P(-Y > -3X) = P(Y 3X) is a normal distribution with mean 0 and variance of 10. Moins

There's a symmetry to this, so the answer is 1/2

KLA

How would you design a program to calculate and store records for a paid parking lot

2 réponses

Did you do white board coding during onsite interview?

Open-ended question that analyzed your expertise in OOP

Apple

What is the result of sampling and reconstructing a 2 khz tone with 3 khz sampling frequency?

2 réponses

You're re-sampling below the Nyquist frequency (4khz for a 2khz tone) and therefore would have aliasing in your signal. Moins

Hey! Thanks for sharing your experience. I have this interview at the location, can you please tell more about the onsite questions? It will be great if you could kindly tell about the questions focusing on coding(was it all in C?), DSP, image processing and ML. Moins

Hudson River Trading

We draw a person at random from the street. Then we keep drawing people until we find someone taller than the first person. What is the expected number of draws we have to wait?

2 réponses

Intuitively the answer could be infinity if the first person we draw is the tallest man on earth. But the probability of this event will be small. So just model the distribution P(X) of heights and simulate draws from it. With a bit of math (integrating 1/f(x) gives log(x)) you get that the answer is indeed infinity. Moins

By definition, probability ranges from 0 to 1. How can it be infinity 😅

1 - 10 sur 475 Questions d'entretien