7 kyu
Single character palindromes II
285 of 772KenKamau
Loading description...
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.
python new test framework is required. updated in this fork
Approved
Good kata but more like a 6 kyu. A single letter can be considered a palindrome but then my solution would fail.
This should be a 6 kyu
Isn't "abcba" already a palindrome? ("abc-" && "-cba" ("abc" inverted)) If so, why is it true? If not, can someone rectify the misunderstanding? Thank you!
It is true because if you change the middle character
c
(you have to change one), you still get a palindrome.I solved it. Thank you.
Could you update the test cases so that when they fail it is possible to tell what argument was passed? eg.:
main = hspec $ do describe "Single Character Palindromes II" $ do it "abba" $ do solve "abba"
shouldBe
False it "abbaa" $ do solve "abbaa"shouldBe
True it "abbx" $ do solve "abbx"shouldBe
True it "aa" $ do solve "aa"shouldBe
False it "ab" $ do solve "ab"shouldBe
True it "abcba" $ do solve "abcba"shouldBe
TrueThank you
Issue or suggestion?
This comment has been hidden.
How? Its not standard practice. Or is it?
The way it currently works is that it fails and you can't tell which test failed. You can keep it this way, but it is just added extra-difficulty - your choice.
So it was in fact a suggestion..
From my PoV it is an issue because the tests are not properly implemented. But if that is part of the difficulty - it is ok. Would be better to mention that in the description. But not mentioning it can also be considered as part of the increased difficulty.
This is a first for me, someone saying that tests
are not properly implemented
in 1/75 of my katas. I will wait for more issues like this before I touch it.I explained why they are not properly implemented: "The way it currently works is that it fails and you can't tell which test failed." Do you need more than 1 person to tell you something is wrong to fix it - even though that is obviously so?
It's not that..I simply don't agree with you. Thanks though.
Description should mention there will be no testing with odd length palindromes.
( Alternatively, improve testing. )
I've improved testing. Both odd and even length palindromes tested.
Close if OK.
So, this issue has been addressed. Can we close?
all good, closed.
As mentioned here, there's an edge case that should be considered.
I have updated the description to deal with this case. All palindrome strings should be False. This avoids many complications.
If Ok, close.
But, it seems that the length of your random string always be even number. So, some solution like my old one still can pass your tests.
Help me understand.
s1 = "abba" s2 = "abccba"
These are even length palindromes. I don't think it's possible to change one character and get a palindrome. Do you have a scenario that yields a palindrome?
As said by Voile before, just follow the link and you'll find myjinxin suggestion:
Currently, this type of case is not covered by your tests. Neither the fixed ones, nor the random ones since you effectively only generate strings of even length.
I've improved testing. Both odd and even length palindromes tested.
Please close if OK.
So, this issue has been addressed. Can we close?
all good, closed.
7kyu? Really B4B? Avg is 6.
Your estimation was 7 and power users average was 7 too. That's why. ;)
Average is 6. My ranking doesn't count towards that. I think 6 is fair. This is too hard for 7.
Yes, your ranking counts. If not, there wouldn't be the possibility to choose that. ;) I had 3 available information: 2x7kyu, 1x6kyu. Average: 7kyu. That's the "normal procedure", I just applied it.
7 seems approriate to me (yes, 6,5 would be better, but we do not have that). If others think it's more appropriate to rank it as 6 too, though, I'll change the rank.
This comment has been hidden.
Ok