Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion problems/785.is-graph-bipartite.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class Solution:
令 v 和 e 为图中的顶点数和边数。

- 时间复杂度:$O(v+e)$
- 空间复杂度:$O(v+e)$
- 空间复杂度:$O(v)$, stack depth = $O(v)$, and colors array.length = $O(v)$


如上代码并不优雅,之所以这么写只是为了体现和 886 题一致性。一个更加优雅的方式是不建立 grid,而是利用题目给的 graph(邻接矩阵)。
Expand Down