We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b655271 commit 33c166dCopy full SHA for 33c166d
haskell/24/23.hs
@@ -15,10 +15,10 @@ part'a g = length $ nub triangles where
15
, c <- adj b g
16
, hasEdge c a g ]
17
18
-part'b g = concat $ intersperse "," $ sort max'clique where
+part'b g = intercalate "," $ sort max'clique where
19
max'clique = maximumBy (\a b -> compare (length a) (length b)) cliques
20
cliques = [ expand'clique g v | v <- vertexList g ]
21
-
+
22
expand'clique g x = foldr expand [x] $ adj x g where
23
expand v c | all id [ hasEdge v x g | x <- c ] = v:c
24
| otherwise = c
0 commit comments