问题描述:
将 1L 水依次倒入 3 个杯子(倒完前 2 杯后,剩余水全部放入第 3 杯),求任意 1 杯水大于 0.5L 的概率。
假设杯子容量大于 1L ,倒出水的体积服从[0, V]上的均匀分布, V 为剩余水的体积。
解题思路:
任意 1 杯水大于 0.5L,可以分解为下面三种情况:
P1. 倒出第一杯水超过 0.5L 的概率为 0.5 ...
将 1L 水依次倒入 3 个杯子(倒完前 2 杯后,剩余水全部放入第 3 杯),求任意 1 杯水大于 0.5L 的概率。
假设杯子容量大于 1L ,倒出水的体积服从[0, V]上的均匀分布, V 为剩余水的体积。
任意 1 杯水大于 0.5L,可以分解为下面三种情况:
P1. 倒出第一杯水超过 0.5L 的概率为 0.5 ...
LeetCode 450. Delete Node in a BST
Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST.
Basically ...
LeetCode 457. Circular Array Loop
You are given an array of positive and negative integers. If a number n at an index is positive, then move forward n steps. Conversely, if it's negative (-n), move backward n steps. Assume ...
There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poison it will die within 15 minutes ...