()
| 67 | |
| 68 | // 扔骰子决定节点的层数 |
| 69 | public static int random() { |
| 70 | int ans = 1; |
| 71 | while (Math.random() < 0.5) { |
| 72 | ans++; |
| 73 | } |
| 74 | return Math.min(ans, MAXL); |
| 75 | } |
| 76 | |
| 77 | // 当前在i号节点的h层,返回key为num的节点,空间编号是多少 |
| 78 | public static int find(int i, int h, int num) { |
no outgoing calls
no test coverage detected