Retired

No Duplicates Here (retired)

217 of 500thegsi
Description
Loading description...
Arrays
Fundamentals
  • Please sign in or sign up to leave a comment.
  • hobovsky Avatar

    This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/136.
    Please join the discussion to help us identify duplicate kata and retire them.

  • user9644768 Avatar

    Ruby 3.0 should be enabled.

  • seasidetesting Avatar

    The kata is far too unspecific about what is considered an invalid entry (at least for Ruby). There should either be example tests showing what's expects or it should be explicitly mentioned in the description. Of course, all tests should also follow these criteria.

  • verrchu Avatar

    maybe its just me but there is too much work with typechecking i saw the one line solutions if the purpose of this kata is to get to that clean one line solution then okay i don't mind

  • JohanWiltink Avatar

    The JS version does something very weird with datatypes, which is not specified in the Description and which I have absolutely no inclination to reverse engineer.

    Also, the tests use Test.assertSimilar instead of Test.assertDeepEquals, so any difference between numbers and strings is lost in rendering test results.

    My honest opinion of this kata is quite unprintable.

  • taw Avatar

    The whole kata is broken in how it deals with false/true (in ruby at least).

  • russh Avatar

    You say to remove falsey values explicitly in the instructions, yet the ruby version submit random test cases include false and true values!

  • mattpark Avatar

    The random test case results do not meet the criteria

  • methree Avatar

    It's not clear what 'invalid' elements are. There's a note about no falsy values in javascript, but in a random python test it expects False to stay in the list.

  • Undefined.L Avatar

    On one of the tests comes to an object instead of an array, and is expected to return "Not an array". Questionable practice.

  • bwheel Avatar

    This comment has been hidden.

  • 833y Avatar

    Dont' quite understand, why in test case list "['?', 'a', 'e', 'y']", the function should return 'Not an array' ?

  • Sunday Avatar

    The description is not too clear and the number first rule is broken. There are some tests with a number first expectation, while others have a string first expectation, expecially for specs with Stringed integers.

  • Proto Avatar

    The tests don't test for all criteria. It intentionally leaves the criteria out because its included in the final submission test. That is poor Kata design. All test criteria, when provided at all, should test for all requirements.

  • ldfritz Avatar

    The "numbers first" rule is broken in the random test cases.

    The hand coded test cases expect [3, "3"]. The random test cases expect ["3", 3].

  • snownpines Avatar

    I don't get it. Why shouldn't the 1 be in the list?

    "Testing for None, t, t, m, z, 2, 3, s, c, m, True, n, r, i, 9, q, 2, j, p, 1, z

    It should work for random inputs too: [True, 1, 2, '3', '9', 'c', 'i', 'j', 'm', 'n', 'p', 'q', 'r', 's', 't', 'z'] should equal [True, 2, '3', '9', 'c', 'i', 'j', 'm', 'n', 'p', 'q', 'r', 's', 't', 'z']"

  • user9929638 Avatar

    The description is too vague. For example the error, needs to be defined in the description.

  • owade Avatar

    Does "with numbers before strings" has any meaning,if not it should be removed from the description because final solution and your description are two different katas/cases !!

  • AntraxMiope Avatar

    I've already unlocked the solutions realized no one is accounting for special chars in the list. How is it that I'm getting this error : -> ['?', 'a', 'e', 'y'] should equal 'Not an array'

  • wgjstokkink Avatar

    Description is incomplete and inaccurate. No mention that 'true' values are possible, and implies that numbers should come before stringified numbers, which is not the case. Also, implies that false valus should be removed, which is also not the case.

  • dancaps Avatar

    All my tests pass except this one. I don't understand why False is in the answer. The instructions don't say anything about boolean values. Am I missing something?

    Testing for 6, 8, 8, 0, e, False, j It should work for random inputs too: [6, 8, '0', 'e', 'j'] should equal [False, 6, 8, '0', 'e', 'j']

  • syllie Avatar

    Very nice kata! And again stunned about the plentitude of ways to tackle problems like thise. Clear requirements and ample test cases. Nice one!

  • jajanka3 Avatar

    Explanation text should be divided in paragraphs. Overall good work!

  • wesley Avatar

    Nice kata! Clear assignment, no tricks, thorough tests

  • bnsmith3 Avatar

    You should give examples in the kata description of what you mean by 'invalid elements'.

  • user4019457 Avatar

    The "The returned array should be sorted alphabetically as a string" piece of the instructions was confusing; I would recommend restating it as "The items in the returned array should be sorted alphabetically, with numbers before strings" or something...

  • Unnamed Avatar

    Why the string '3' is expected to be before the number 3 (Python)?

  • ubaw Avatar

    I think you should add number 0 (zero) to array which is passed as argument. Some current solutions is not properly.

  • GiacomoSorbi Avatar

    Translated into both Ruby and Python, if you wish to approve them :)

    If you do, please let me know as I would like to edit the description a bit, taking into account that Python does not have arrays (it has lists, not that much different from a solver pov, but still worth a bit more precision).

    Are you ok if I add random test cases to the JS version too?

  • ZozoFouchtra Avatar

    This comment has been hidden.