Skip to content

Commit 29a1d20

Browse files
authored
Update random-pick-with-weight.cpp
1 parent ea660e3 commit 29a1d20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

C++/random-pick-with-weight.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Time: O(logn)
1+
// Time: ctor: O(n)
2+
// pickIndex: O(logn)
23
// Space: O(n)
34

45
class Solution {

0 commit comments

Comments
 (0)