6 kyu
Midtown Navigator
143 of 221K-Calderon-ASC
Loading description...
Fundamentals
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, Python: The input strings always have ordinals with "th" while correcly you'd have "?1st", "?2nd", and "?3rd" for all numbers which can occurr in the inputs.
In the description examples what do these
E
andW
stand for? East and West? And if so, does this play any role in the solution?If I remember correctly W means West of 5th Ave and E East of 5th Ave So for 46th st and 7th ave it would be "7th Ave and E 46th St".
So it does not matter for the solution
Java translation
Approved.
could be more interesting if one would stay on the same street and/or same avenue, and Puck's suggestion with "1 block" too, but I still liked.
Snakey Snake Python translation
🐍
Please review and approve.
approved
Example in description says
midtownNav("8th Ave and W 38th St", "7th Ave and W 36th St") // output => "Walk 2 blocks south, and 1 block east"
Test cases only accept
blocks
.Don't know if it's actually an issue but... it gave me extra work for nothing
You would just need ("s" if b != 1 else ""). I started to have more extra work when I assumed one would stay on the same street and/or avenue. :)
That's what I did and that's the extra work I was talking about.. cause I'm lazy and I had to write that for nothing xD
Nice little problem, gives a challenge in sorting the problem out and working on "tolerance for tediance.""