Problem 1883. GJam 2013 China Event: Happy Teams 100 Pairs
Solution Stats
Problem Comments
-
4 Comments
I tried to put in all 100 cases but the testsutie clipped. Had similar problem on my 3900 test cases of Cannon Ball.
If I am not mistaken several of the current solutions would fail the following test: names={{'a','b'}, {'c','d'}, {'d','e'}, {'e','c'}}; (they should return 0)
I will run the solutions against the full Google Set to find a more robust subset of test cases. I may also add your suggested case. Thank for the feedback.
Good example from Alfonso. I had to fix my code. The problem is pretty much about trying to create a tree. Alfonso's example creates a small forest: a case that seems to be lacking from the test suite.
Solution Comments
-
1 Comment
note: this solution is not correct (e.g. {{'a','b'},{'b','c'},{'c','a'},{'d','e'}} should return 0)
-
1 Comment
Elapsed time is 0.047208 seconds.
:-D
-
1 Comment
0.087544s
-
1 Comment
going for speed here (6 problems in 0.168566s)
Problem Recent Solvers9
Suggested Problems
-
Sum all integers from 1 to 2^n
12465 Solvers
-
92 Solvers
-
503 Solvers
-
383 Solvers
-
Create a matrix with difference of each row of input matrix
72 Solvers
More from this Author260
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!