Sample Strings According to Rating Distribution (Softmax + CDF)
You are given a list of strings and one real-valued rating for each string. Implement a sampler that returns strings with probability proportional to the softmax of their ratings.
Check more interview questions and experiences about Pinterest
