← Questions
Substring search and weighted random sampling
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Two problems for a machine learning engineer screen:
- Find where a pattern occurs in a text, and discuss doing better than checking every position.
- Pick an item at random with probability proportional to its weight.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
