📅  最后修改于: 2022-03-11 14:56:28.038000             🧑  作者: Mango
BronKerbosch(P):
S := empty stack
S.push({}, P, {})
while S is not empty:
R, P, X := S.pop()
if P and X are both empty:
report R as a maximal clique
if P is not empty:
v := some vertex in P
S.push(R, P \ {v}, X â {v})
S.push(R â {v}, P â N(v), X â N(v))