6 kyu
Crossing the river and its tributaries
24 of 47rPersival
Loading description...
Algorithms
Strings
Performance
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.
JS translation (active author)
approved by someone
Full test suie compiles with warnings:
I would also suggest adding message suppliers to assertions, at least in some basic/small random tests, for better feedback on failure. For details see https://docs.codewars.com/languages/cpp/authoring#custom-assertion-messages .
Fixed
English is not my primary language so it might be a language issue, but for me initially it was not really clear what "crossing the river" means and why I need to account for all tributaries. Cannot travellers just, like, cross the river and move from the left bank to the right bank, so cost would be always 1? It took me a while to understand that the travellers want to trip along the whole river, starting at source, and reaching its estuary (word?).
I mentioned in the first sentence that the travelers are going to the trip along the river, but I will try to clarify the description. English is not my primary language too, so please let me know, if I make any silly mistakes.
This comment has been hidden.
Fixed
#include <iostream>
shouldn't be added to the initial code.Fixed
Needs random test cases, but otherwise looks good. Fun kata!
Fixed. Thanks:)