5 kyu
Typing series #5 --> the insert key and moving cursor
Loading description...
Strings
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.
Description is contradicting test cases. Please align.
Test cases expect
pqrswxyz
, description expectspqrs
.This part is not correct in description:
I got confused by this too. It appears that
[ins number]
would force insertion mode on, but that's not true... It's still a toggle.sorry i didn't address this sooner, but yes,
[ins]
and[ins n]
are toggles. it's like if you physically type the string out and press[ins]
on your keyboard; it behaves as a toggle.Is this then correctly phrased in the description?
yes, all good now
from examples:
yet, from tests:
so what is the specification for an
[ins n]
after another[ins n]
??I found out, I'll log an issue.
Almost 10 months now.. someone should approve this amazing kata..
why don't you do it?
I m banned from doing it.. :-/
Otherwise, I could have approved your katas first.
ah that's too bad, I know you were a bit eager in the beginning in approving translations, but your current translations all look to be of high quality. I hope they'll revert the ban and give you another chance.
thank you for that comment, saudiGuy! and dfhwze, please, it would be really appreciated if you approve this kata!!
Sure, but change your description, I have an open question in the comment above.
hey, dfhwze, thank you so much for approving my kata! I have just changed the description, does it look better now?
As pointed out below, the cursor goes out of bounds in some of the tests.
See the following examples from the random tests:
wlruxwqg[ins 0]xvlg[ins 9]yzjbpqj[ins 8]urtbr[22][ins -20]p[-17]fqajg
,tn[ins 0][ins -3]xd[ins -4]nce[2][-7]pzvd[10]uti[1]cqmvn
jufwuzcwbp[ins 3]ntyd[-6]wyltfby[ins -17]hn[4][ins 0]fh[ins -21]egpdanjvgxwg
Duplicate issue. Looks like Voile and I posted near the same time and I didn't see his issue before raising this one. Closing.
The description needs to specify how cursor indexing is handled when it's negative. Currently it just says "negative numbers can appear and you're expected to handle them", it doesn't tell how.
n = len(s)
is a possible input: it sends the cursor to the end of the buffer.Also, as mentioned below, random tests generate invalid input, such as:
There are less than 15 characters when
[-15]
happens.Hi, sorry about the miscommunication. I have given a (hopefully clear) example in the description and have added more tests containing the edge case. To approve this, I have to close this issue, but please raise it again if the issue is still there.
I'm passing about 2/3 of the tests and I'm a bit confused. I think you need to add addtional examples (with a breakdown) and sample tests for something like the following:
wlruxwqg[ins 0]xvlg[ins 9]yzjbpqj[ins 8]urtbr[22][ins -20]p[-17]fqajg
It's unclear to me how the answer is (based on the tests):
xfqajgvlgxwqgurtbrpqjp
It appears the cursor goes out of bounds, unless I'm misunderstanding the description?
Edit:
Another one:
tn[ins 0][ins -3]xd[ins -4]nce[2][-7]pzvd[10]uti[1]cqmvn
The cursor goes out of bounds here sometimes.
This is really a issue.
I can raise it. Just unsure if I'm making a silly mistake somewhere.
Closing this as there is issue above already.