7 kyu
Simple equation reversal
1,289 of 2,890KenKamau
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.
description probably should specify there will be only integer numbers in test cases
python new test framework is required. updated in this fork
Approved
One of the hardest 7kyus.
The title of the kata is a trap lol. The definition of an equation needs to have an equal sign "=". The kata is more like expression reversal.
what a joke
COBOL translation.
approved
Great kata! This was fun.
Great experience! Thanks! But "simple" does not mean "easy").
The C translation isn't a 7 Kyu Kata, it's more difficult.
How is that?
parsing of integers separate from other chars, don't reverse the integer, but append it. It's much more work than your typical 7Kyu C kata. You can also check the reference solution.
Perhaps so, but it's possible with just some loops and if-conditions.
everything is possible with "some loops and if-conditions"; that doesn't tell about the kata's complexity however. This one takes many more loops and if-conditions than your typical 7 Kyu C kata. At least in my observation.
ok, I agree Is your point that for C a new kata should be created?
On Codewars ranks are shared across languages and naturally there are great disparities depending on them. That's a feature and we have to do with it. If we don't, then what? All katas in NASM (for example) should be duplicated because the most basic operation is much harder in this language than in anyone else?
when you do languages like NASM, Fortran, C, COBOL and such, you implicitely agree that the task will be harder than in Python or JavaScript. ranks are shared across languages and the only alternative is to publish a "X kata, Y language version" for everything, which will lead to chaos (and most of them wouldnt even leave beta anyway, after having been downvoted to oblivion by the usual suspects)
I understand the problem. I don't have a solution, and if I would, it would most likely not be implemented anyway.
A very workable solution might be to give the user access to some predefined functions, supplied by the translation author, to simplify the job at hand. That could be checked during review of the translation to make sure the difficulty is comparable to the original problem.
that's a good idea - some of the C versions of g964's maths katas do that. but i see several pitfalls:
I agree, that would be unmanageable. Ranks are attributed based on the kata's initial language(s). Then one must know ranking in others may be somehow unfair (one way or another, BTW).
C translation
Approved!
This comment has been hidden.
Those aren't whats called equations
It's not a Kata on the English language. You can call them whatever you want, as long as you can write simple 7 Kyu code
This comment has been hidden.
This comment has been hidden.
'looks like u solved it'
does regex work here
A minor issue; I like to dump the function signature / dummy implementation into a large file on my laptop and work on it offline before submitting. But because you name all of the functions "solve", I have to rename them locally, then change them back to "solve" when submitting them here. Could you use more specific names for these functions in future? For example, "solveEqRev".
I assumed that the symbol names could have been more than 1 character in length and that increased commplexity of the kata quie a lot
Hi,
the examples in the descirption are lacking there quote marks to be strings.
Thanks! Fixed.