Beta
The Seven Bridges of Königsberg
Loading description...
Graph Theory
Fundamentals
Discrete Mathematics
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Python new test framework should be used (Refer this for more detail)
Description says "a walk that crosses all of the bridges once and only once"
Tests check "a walk that crosses all of the bridges once and only once and visits all land masses"
Sometimes some of the random test cases claim to have neither a circuit or path, but in reality do actually have a path (at least that's how testing the particular graph on paper turned out for me). I tried to find a pattern, but I couldn't. It might very well be my code that's bugged here and I could totally have messed up when figuring out the graph on paper, but maybe you should have another look on the randomized tests.
Needs random tests.
Random tests added. That's my first attempt at implementing random testing. So, fingers crossed.
Also, I am struggling with stopping user modified inputs. Do you have any suggestions?
Copy the array before passing it to solution, and preferrably compute the expected result first, before sending the array to user's function. (for python smth like
copy = arr[:]
should do the trick)