5 kyu
Simple parenthesis removal
224 of 485KenKamau
Loading description...
Strings
Logic
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.
This comment has been hidden.
Approved after expired grace-period.
Python fork updating to new test framework
Can't be approved, description merge problems.
I'm aware, the issue is that I can't get rid of it. I have another translations suffering from the same problem. I've forked the kata, copied the description, forked my translation, pasted the description, published (that worked), but still can't approve. I have no idea what's going on.
EDIT: Nevermind. I created an entirely new fork, copied everything over, published, and was able to approve. Issue resolved.
.
It's the only way.
My code in VS CODE works perfectly with basic tests, but in codewars, with random tests, that have a long expected result, I have a problem. Is there any way to see test arguments?
https://docs.codewars.com/training/troubleshooting#print-input
Nice one :)
Hi, need tests like next: a-((b+c-d-f)+g)
JS: Only failed at this fixed testcase:
Test.assertEquals(solve("((((-(-(-(-(m-g)))))))"),"m-g");
It seems that your parenthesis are not balanced ;-)
Should be OK now. Just a copy-paste error.
O_o
There is no testcase where the answer starts with a "negative variable", for example "-(x-y)" --> "-x+y". This allows for shortcuts.
Pulling it down for changes that have been suggested by you and others.
Tests have been updated as requested by all. Your solution has been wiped out. Please check.
Looking good.
Hi, this kata need tests like next:
So, when we have plus sign in front of nested parenthesis while in front of the outside parenthesis is minus. Thanks.
The minus comes from
u-(...)
. Does this clarify?that was not a question... ;)
Thanks B4B. English is not my first language:-)
Tests have been updated as requested by all. Your solution has been wiped out. Please check.
Needs tests like
Many thanks ZED. You arrived late to this party; normally you are first to attempt my Katas!!
I will add these tests.
I was preparing for a test, just play a kata before sleep o_O
Tests added. Please take a look.
O_o
I think 4 Kyu is too high for this kata..
your opinion and I'm perfectly fine with that. But it's not 7 or 6 either... ;)
Why not? I had intended to vote it as
6
, but finally I choose7
just because I saw a4
;-)This comment has been hidden.
@B4B. I agree with @myjinxin2015. I think it should be rated 7 Kyu and left as it is. No need for the additional deep nesting that you proposed below. Shall we close that issue?
even without nested parenthesis, it's not 7 kyu...
This comment has been hidden.
OK
Tests have been updated as requested by all. Your solution has been wiped out. Please check.
missing type of edge cases:
Thanks B4B. I need update this and add specific tests for this. Pulling it down for some time.
ok, no problem (damn, I cannot submit anymore my last version... ;o ). Thnk about that type of cases too:
And you need to check for expressions beginning with parentheses (and even several nested ones right at the beginning)
Thanks B4B. I have made the changes and added random tests for these cases. I have also included some of these tests in the example cases.
I disagree about the nested parentheses: better having a harder kata with complete coverage than an easier one but with incomplete testing suite. And don't worry about the current one, even with the full batch of tests, it will get completions fast enough. It's a rather generic type of problem (ZED, smile67, Voile, unnamed, ... Far enough people to get this one out of beta ;) ).
Ok. Let me look at it again.
But you're tricking power users, with incomplete coverage without saying about it in the description... ;p
What about the ZED's suggestions? At least the first one.
EDIT: just saw your answer to him. I do not understand your logic: if you add the three tests, why not other nested cases?
Noted B4B. I'm still making the changes.
well, clear the things in the description and I'll resolve this, then.
I'm pulling it down for changes.
Tests updated. About 8 solutions wiped out, perhaps due to the deep nesting that was suggested.
Check and confirm.
looks almost good to me: the only thing that is lacking is tests beginning with parentheses. And you could add in the description that only one letter variables will be used and that there is no need to simplify the expression.
No need for that. I have added fixed and random tests for opening parenthesis as well.
Perfect