Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为了寻找更快的无替换加权抽样,出现了以下问题:
是否有一种算法可以使用输入大小的线性时间来实现随机抽样而不用不等的选择概率替换?在对这个问题的回答中建议了一个 O(n log n) 实现——这可以改进吗?