Weighted random pick with add and remove
- Given positive weights, return a random index with probability proportional to its weight.
- Turn it into a structure of weighted keys that supports adding a key, removing a key and drawing a random key by weight, all efficiently.
No answer yet. Write the first one; the best answer gets endorsed.
