We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 667261f commit 5899daeCopy full SHA for 5899dae
haskell/24/23.hs
@@ -16,7 +16,7 @@ part'a g = length $ nub triangles where
16
17
part'b g = intercalate "," $ max'clique where
18
max'clique = maximumBy (comparing length) cliques
19
- expand v c | all id [ hasEdge v x g | x <- c ] = v:c
+ expand v c | all (`S.member` postSet v g) c = v:c
20
| otherwise = c
21
expand'clique g x = foldr expand [x] $ S.elems $ postSet x g
22
cliques = [ expand'clique g v | v <- vertexList g ]
0 commit comments