Skip to content

Commit 8ec7c1c

Browse files
authored
Update campus-bikes-ii.py
1 parent 2002cb6 commit 8ec7c1c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Python/campus-bikes-ii.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Time: O(w * b * 2^b)
22
# Space: O(b * 2^b)
33

4+
# if w = b, we can even apply Hungarian algorithm (see https://en.wikipedia.org/wiki/Hungarian_algorithm),
5+
# it can be improved to O(w^3), see https://github.com/t3nsor/codebook/blob/master/bipartite-mincost.cpp
46
class Solution(object): # this is slower than Solution2 in python
57
def assignBikes(self, workers, bikes):
68
"""

0 commit comments

Comments
 (0)