• Custom User Avatar

    Nope all Codewars kata are function-based, not IO-based, kindly refer to the documentation here on how things work ^^ Happy Coding !

  • Custom User Avatar

    Do we have to take input from the user?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Problem with this solution is that it will return incorrect results if the collection contains numerical strings. For example, ["13", "42"] should result in [ ] because the array contains no ints, but your solution will return [13, 42].

    I can see one problem with failure messages tho. String elements are not quoted, what makes it impossible to tell 7 from "7" on failure. (EDIT: fixed)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    It is not a proper way to raise an issue. I cannot fix anything if I do not know the languag you attempt, and your code.

  • Custom User Avatar

    For input [908, 134, 416, , o, 5, R] expected:<[908, 134, 416]> but was:<[908, 134, 416, 5]>

    For input [1, 2, 'aasf', '1', '123', 123] expected:<[1, 2, 123]> but was:<[1, 2, 1, 123, 123]>

  • Custom User Avatar
  • Custom User Avatar

    not a question

  • Custom User Avatar

    OP solved the kata

  • Custom User Avatar

    you altered the return type of the method. it should return a List<Object>, not a List<Integer>. the input list can contain potentially any type, therefore so can the output, expect Strings

  • Custom User Avatar

    Where is my error ? :src/test/java/SolutionTests.java:43: error: incompatible types: List cannot be converted to List
    List result = Kata.filterList(List.copyOf(input));
    ^
    1 error

  • Custom User Avatar

    Agreed.

  • Custom User Avatar

    You have a typo in the example namely in the output of the last number:
    ListFilterer.GetIntegersFromList(new List<object>(){1, 2, "a", "b", "aasf", "1", "123", 123}) => {1, 2, 231}

    There should be:
    ListFilterer.GetIntegersFromList(new List<object>(){1, 2, "a", "b", "aasf", "1", "123", 123}) => {1, 2, 123}

  • Custom User Avatar

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

  • Loading more items...