I just changed the solution a little. This one should be more efficient and allow the user for more time while testing their solution :'D Please correct me if that assumption is wrong ^^'
Also the description was pasted from a fresh translation so it should be up-to-date, although some diffs were marked?
beautiful!!
I would just change it a little bit to fit for more types of test(such as, stripUrlParams('www.codewars.com?aa8=1&b6=2&a=2',['b6']) )
change:
queries_obj = [query[0] for query in queries]
to:
queries_obj = [query.split('=')[0] for query in queries]
You're missing a '}' in the test cases. It wasn't obvious at first, because I thought it came from my solution code.
But other than that thanks for the translation. I had fun :)
OOOps, I've spent a long time finding that problem, but failed.. anyway, I just remembered one kata that I use the exactly the same method and syntax to solve :).
I just changed the solution a little. This one should be more efficient and allow the user for more time while testing their solution :'D Please correct me if that assumption is wrong ^^'
Also the description was pasted from a fresh translation so it should be up-to-date, although some diffs were marked?
fail if you have a parameter with more than one character
but still good anyway
I think ver0man has right.
https://www.codewars.com/kata/array-dot-diff
I used almost the same code, only changed variable name...
It's not best practice to use lst.pop(idx) where idx comes from another related(mapping) list,
it may break the relationship.
Although it is OK here..
Beautiful? Good luck with maintenance of this.
beautiful!!
I would just change it a little bit to fit for more types of test(such as, stripUrlParams('www.codewars.com?aa8=1&b6=2&a=2',['b6']) )
change:
queries_obj = [query[0] for query in queries]
to:
queries_obj = [query.split('=')[0] for query in queries]
Don't compromise readability just to make your code shorter.
This comment is hidden because it contains spoiler information about the solution
Thanks. I'll update the java example testcases.
Thanks. That's exactly where things went wrong. The real testcases are fine, but I miss the '}' in the end of the example testcases.
I'll update asap, whereas needed to contact the original author first. THanks for your comment.
You're missing a '}' in the test cases. It wasn't obvious at first, because I thought it came from my solution code.
But other than that thanks for the translation. I had fun :)
You suggestions are welcome.
OOOps, I've spent a long time finding that problem, but failed.. anyway, I just remembered one kata that I use the exactly the same method and syntax to solve :).
Anyway, thanks! Sorry for the inconvenience.
Do you mean that this kata is duplicated here at Codewars? What is redundant for you? Could you be more specific?
It seems a redundant question as one that already in the kata pool..
Loading more items...