5 kyu
The Snake in the Square
90 of 130dgrcode
Loading description...
Matrix
Puzzles
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.
Quite nice and pretty kata, thanks.
Is it right that a function with nothing but
return null
times out?null
is not a valid output per description, so does it matter? you would getmax buffer size reached
otherwise (as happens forv12
)Nice kata.Thank you!
Python translation https://www.codewars.com/kumite/5d60570350aa18000d2c94c1?sel=5d60570350aa18000d2c94c1
We've added Python to your Python, so you can do programing Python while you're programming Python
That's awesome! :) Thanks for writing the translation!
Approved
Very nice kata, thank you
I'm glad you liked it. Thanks! :)
The formatting in the description are not aligned at all. You should fix it so they actually look correct ;-)
Test.expect
should be replaced toTest.assertDeepEquals
.Strangely for me, but replacing the author's custom
compareArrays
withassertDeepEquals
results in Timeout, even though now his function takes0.5s
to execute..
Sample test still has the default templates.
.
For the Javascript tests, you should remove the default test at the top. Just leave your tests in.
Done! I removed the top tests. You meant from the Tests Cases and not from the Example Tests Cases, right?
Thank you for your feedback!
If you can add some example testcases will be more fine ;-)
The second thing is: The graphical snakes are not actually similar to the actual snakes ;-)
haha With my first Kata I wanted to use as many tests as possible. And I also learnt this morning about random testing...
Regarding the graphical snakes, I did my best with unicode :)
Thank you for your feedback!
I really enjoyed this challenge. Thanks for providing it!
When I first read the description, I found the "weight sensor" idea a little confusing. It became clearer once I understood that I was simply placing the snake's body within a square of the minimum required size.
Nonetheless, great fun. Congratulations on your first kata!
Thank you for your feedback!
I agree that the whole "weight sensor" thing is a bit confusing. I think I went too far from the actual problem with the story, and I tried to link them through the weight sensors. I will think about other way to tell the story so it is clearer.
I'm glad you liked it!
EDIT
I have added the following text (in italics):
I hope it is a bit clearer now
Yes, I think that does help. Thanks for improving it!