7 kyu
Drone Fly-By
3,354 of 6,738PG1
Loading description...
Fundamentals
Strings
Arrays
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.
Java translation
Please can someone explain the logic of the answer in this test?
Testing for xxxxxxxxxxxxxxxxxxxxxxxxxxx and 212121212121212121212121212121212121212121 It should work for random inputs too: expected 'oooooooooooooooooooooxxxxxx' to equal 'ooooooooooooooooooooooooooo'
We don't know what this "212121..." string represents so it's hard to debug for you.
The test inputs should only be "=" and "T" as far as I can tell in all languages?
So, read this part on printing the test inputs:
How to print tests
Then for your code, print to console which inputs are causing your solution to fail - the input shouldn't be "2121..." but something like "=====T".
It shouldn't be, but it is in TypeScript.
Swift: sample tests don't compile. See comment section for more info.
Should be fixed.
swift: in tests function parametels call is incorrect
This comment has been hidden.
your code/algo always assumes that len(lamps)>len(drone), when len(drone) is sometimes greater than len(lamp)
This comment has been hidden.
Your solution doesn't work correctly, how is this a kata issue?
I don't understand what's wrong with this code.
Don't post as an
issue
unless there is a clear problem with the kata code. If you have questions about your solution not working you should post as aquestion
instead.Error message says
Invalid count value at String.repeat ()
which means you're using that method incorrectly (you should figure out why).R translation
Approved
It is an absoulte scoundral. I passed the test but not the attempt. It has scammed me for its kata. This test should be ashamed of itself.
Not a kata issue.
This comment has been hidden.
with error messages like this
'oooooo' should equal 'ooooo'
, it shows you what you returned first, and then what you should have retuned. with one atop the other you can clearly see yours has an extrao
:This comment has been hidden.
Yeah, I get that. But I still don't see why those 13/100 or so cases fail with my given code. How would you go about troubleshooting this? I don't know what input is failing.
log the input using print(drone, lamps) and rethink your algo
These are random tests: xxxxxxxxxx 10 ==========T 11 <-- 10 lamp turned off, drone stops behind ooooooooooo <-- 11 lamps were turned on
x 1 =T 2 <-- 1 lamp turned off, drone stops behind oo <-- 2 lamps were turned on
Can anyone can tell me how is this possible? We have 10 turned off lamps, but drone light 11 of them !!! There are 10 tests with similar situations.
The position the drone is on also gets switched to on. 10 off turned on, plus the one at the drone position.
Imagine the situation: you are in the park on this task and you see 10 lamps turned off and nothing else there. Please explain to me how the drone can turn on more lamps than it physically stands.
I understand that it lights the lamp above it, but only in cases when it does not reach the end.
C++ : while trying to basic-test - it shows the wrong answer(basic_test: xxxxxx, ====T -> oooooo instead of ooooox). However while submitting , it successufelly passes all tests.
C++ sample and fixed tests both have
ooooox
as expected.oooooo
does not show up in these tests.C Translation kumited.
Approved, thanks
This is testing other code than mine, and generating an error. It passes on test, but fails on submit, reporting an error on a code I didn't write.
Third triplet for today
Coffeescript
Crystal
Julia
Approved
Please, fix tests for C++:
main.cpp:25:24: warning: comparison of integers of different signs: 'int' and 'std::__cxx11::basic_string<char, std::char_traits, std::allocator >::size_type' (aka 'unsigned long') [-Wsign-compare] for(int i = 0; i < drone.size(); i++){ ~ ^ ~~~~~~~~~~~~ 1 warning generated.
I'm having this issue. I found out that it is testing other code than mine on submit.
This issue is caused by the test code :)
fixed
Question regarding final tests -- is it possible to show all function variables
lamps
anddrone
which are in use for test/check/verification . I tried all the failed values in final tests but got correct answers -- tests were passed . There is suspiction some test's values are incorrect . OR I didn't catch some detail in this task (some kind of trick)Custom error messages are duplicating the default ones in Python.
resolved
Python translation Please check and approve
Approved,thanks
Haskell translation
Approved
C++ Translation
Please Review and Approve.
Approved
Good to see you again with your katas. Hope that you are well. :)
Thanks Raul
The drone always flies right to left
Shouldn't that say left to right?
Yep, fixed, thanks