For a portfolio of tickers, support add, remove and get-random in O(1). Then pick a ticker in proportion to its weight, and pick a uniformly random symbol from a stream of unknown length.
Unlock detailed company stats for this questionUpgrade
Community answers
No answers contributed by the community yet.
Related courses

Course

