We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Graph Theory
- Clique
- Discussions
Clique
Clique
Sort by
recency
|
77 Discussions
|
Please Login in order to post a comment
int clique(int n, int m) { int i=2,c=0;
long double r=0.0,e=0.0; e=(n*(n-1)/2); while(i<=m) {
return c; } On submission the code fails for 9/11 test cases. But while giving custom input from the failed test cases, it works well. I am unable to find the exact reason. return c; }
here is my solution in java, javascript, python, C, C++, csharp HackerRank Clique Problem Solution
In Test 10 the 3rd input specifies 15 vertices and 144 edges. A 15-vertex simple graph can have at most 105 edges. If we consider multigraphs then the task is meaningless. The expected answer is 16, which is a nonsense. A 15 vertex graph cannot contain a 16 vertex subgraph! So that input is wrong.
Here is the solution of Clique Click Here
Those having a hard time implementing the formulae can see this.. https://cs.stackexchange.com/a/51033