瀏覽代碼

Fix #148: Add State(Enum) to social_graph_snippets.py (#167)

cclauss 6 年之前
父節點
當前提交
e116bd75fc
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      solutions/system_design/social_graph/social_graph_snippets.py

+ 6 - 0
solutions/system_design/social_graph/social_graph_snippets.py

@@ -1,5 +1,11 @@
 # -*- coding: utf-8 -*-
 from collections import deque
+from enum import Enum
+
+
+class State(Enum):
+    unvisited = 0
+    visited = 1
 
 
 class Graph(object):