1. 程式人生 > >【LeetCode】抽樣 sampling(共4題)

【LeetCode】抽樣 sampling(共4題)

第一部分 拒絕取樣 rejection sampling

【382】Linked List Random Node

【398】Random Pick Index

 

第二部分 水塘抽樣 reservoir sampling

【470】Implement Rand10() Using Rand7()

【478】Generate Random Point in a Circle