Implement maximal clique algorithm.