提交 f4cf78ae 编写于 作者: L labuladong

update content

上级 4d64cc98
......@@ -104,7 +104,6 @@ int[] getRandom(ListNode head, int k) {
对于数学证明,和上面区别不大:
![](https://labuladong.github.io/algo/images/水塘抽样/formula2.png)
因为虽然每次更新选择的概率增大了 `k` 倍,但是选到具体第 `i` 个元素的概率还是要乘 `1/k`,也就回到了上一个推导。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册