7 kyu
Set Reducer
1,086 of 2,155Endre-Kodehode
Loading description...
Recursion
Algorithms
Logic
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.
6kyu
wrong tests
A very poor report.
This comment has been hidden.
the test result should be 2 not 13: input: [1, 7, 0, 6, 1, 9, 0, 7, 1, 6, 0, 9, 0], output: 13,
Why? as far as I see, the expected answer for this test is indeed 13?
No,
13
is correct. Not a kata issue. See https://docs.codewars.com/training/troubleshooting/#post-discourse.Sorry. I should have written "the test result should be 1 not 13"
the description says: "Numbers with no identical numbers preceding or following it returns a 1" Therefore I would expect 13 gets reduced to 1.
I suppose, the following reduction is correct? [0, 1, 1] -> [1, 2] -> [1, 1] -> [2] -> 2 Don't you agree?
13 is a single integer, you don't need to return a number with a single digit.
Thank you very much for the clarification.
same problem
I notice a pattern on here where a lot of beginner katas (7kyu etc) are becoming near-untouchable for someone actually at that level, people complain about it, only to be countered by a bunch of 1 Kyu & 1 Dan folks with "it's actually correct to be 7kyu because... ==> <proceeds to list a bunch of concepts that are a solid 8-12 months away for someone who's actually 7 kyu>."
Even the author of this kata (see below) has estimated it to be at 4 Kyu FFS.
Yea, Its alot harder kata than 7
This was a fun challenge but sadly I won't be getting the points for a 5 kyu or 6 kyu kata that this kata is equivalent to. Ive done 1275 kata so I think my judgement isnt too bad in this area. I wonder just who these people are who are voting it level downwards like this. Maybe they're just doing it to show off to themselves or other people. The beta period for accessing kyu level needs to be extended until a hundred+ people have completed it. Otherwise you end up with this.
Nice Kata!!! Feels like 6 kyu to me!))
This comment has been hidden.
Approved
Looked very tough in the begining, but if you use the right tool it's very easier and correctly classified as 7 KYU.
I really liked this problem. It's like a Yosemite 5.9.
Not a kata suggestion
nice kata. it defied the one line solution.
I think there is a mistake in this test: { 8, 1, 6, 1, 2, 7, 7, 7, 7, 6, 5, 3, 2, 1, 8} The test expeted 3, but it's 2: {8, 1, 6, 1, 2, 7, 7, 7, 7, 6, 5, 3, 2, 1, 8} {2,3,2,2,4,1,1} {3,1,1,2} {1,2,1} {2,1} {1,1} {2}
What do you think about it?
Thank you. Now, I understand my mistake.
Haskell translation
Applicative
Java translation
approved
I thought it was a fun problem, but also felt it was probably a 5 or 6 kyu. I know that's feedback which has already been given. If there isn't one already, I'd suggest a test case which has a single element array. Most base case conditions seem to use array.length==1, which has that kind of input as a potential vulnerability.
The specs say that case must not exist. Which makes it perfectly valid to optimise for the specs, and check the base case after the first iteration.
This comment has been hidden.
An interesting kata, but it doesn't feel like 7 kyu. Maybe 5 kyu would be more suitable. IMHO.
I estimated 4 kyu 🤷♂️
Oh, thank you sir. I've got it just yesterday. Catch up! ;-)
Fair 6 kyu, or an easy 5kyu.
5 kyu for a simple algorithm? Should flooding a maze (5 kyu) then be purple?
dfhwze, 6 kyu?
sure this could be 6 imo, but average vote during beta was in clear favour of 7
dfhwze, I'm new here and I don't know how beta testing works in your community. But I guess it must be people with 1 kyu or some dan, who had a lot of practice. So you maybe look only on complexity of the final code. For learners, on the other hand, it's not just the code, it's finding an algorithm and then coding. And the first part could be even more intricate than the second one. My assume is you may not be consider this. As for me, finding the algorithm for this kata was pretty challenging. I tryed three ways before I chose the way I liked. I thought at first, maybe it's just me, but after studying the other guys' solutions, I realized I was not alone. You can check them, they are lo-o-o-o-ong, too long for 7 kyu. I know, some guys are getting fun and making long codes on purpose, but not almost all of them. According the time I spent and the brain effort I deployed, I feel this kata like 5 kyu. Just my thoughts, a sight from the other side. I hope it could be useful for you.
Anyone can partake in beta testing (ranking and voting on beta kata's), so why do I only see 1 kyu (+) users there ...
I see, thanks. I'll try someday :-)
Is it unreasonable to rank a kata on its simplest possible solution, instead of ranking it according to how difficult some people make it for themselves?
There is a simple ( but elegant! ) pattern here, which can also be expressed simply ( but elegantly :) if you have the tools.
Availability of tools is also a reason why a task can have different difficulties in different languages. In Python, I had to massage the available tools a little. In JS, I had to partially write my own. In Haskell, this is an absolute no-brainer because the tools exist out of the box. Kata can't have different rankings in different languages though.
I think so, yes. There are solutions to
Become Immortal
which make the kata look like it could have been 6kyu. There are many other kata whose solutions can be much simpler than their rank might imply.Having said that, even the naive approach to this kata should be able to solve it with just a a few loops and simple variables. No advanced algorithms are needed, there's no hidden information. There are tools that make it easier if you know about them, but even without them I think this should be a 6kyu at best, and I think 7kyu is fine.
(1) and (3) are overrated, and (1) should not have been translated to Python ( or at least certain imports should have been forbidden ).
I don't have an opinion on (0) or (2) because I've never been able to solve them.
by current standards, immortal would come out of beta at most at 3 kyu. Which says a lot about the current standards...
I would add tag:
arrays
added. You can do it with your magic powers as well ^_^
Factor translation
approved (by author I suppose)
Python translation: https://www.codewars.com/kumite/63cd50d2cd814500139148da?sel=63cd50d2cd814500139148da
nice 👍
Hi again,
well, the required stuff is in there, but the organization of the setup must be improved a bit yet:
beta testers can have a hint that the test suite is properly builtuser knows what he's dealing with, so, 3 sections please:Suggestion: I's strongly suggest that you shape the data for fixed tests differently: it's a pain for everyone (osers of the sample tests, maintainers) to have all the inputs in one array and all the output in another one. It makes very hard to cuickly check which is for what. So it would be better to have something like:
(acutally, here,
[output, input]
would be more readable/useful)Cheers
Fixed all issues you mention and re-formatted the test cases 😊👍
Hi,
the first sample tests should be the one from the description.
Cheers
Fixed 👍
The visual example is cool, however I find it somewhat confusing having the result at the top. Could you flip it, so inputs are at the top and result is at the bottom?
fixed 👍
Looks nice
Chabby, no longer the "Thunder" from down under? Now you're "Mod Chabarott", congratz!
Tests should use chai, not the legacy framework
Fixed 😊
No random tests
what do you mean by random? I updated the test code, does it look ok now..?
Random tests are tests that are randomly generated during runtime (ie. they will be different every time the tests are run).
Have a read of the docs
ahh, that makes sense, fixing
Added random tests
I've unpublished again, because you removed your fixed tests. You need both. First the fixed tests, then the random tests.
Edit: The random tests look good though
fixing
added fixed tests back