Indeed many solutions directly filter out string values and leave everything else in the list, but as @Chrono79 said the Kata input only consists in intgeres and strings.
Furthermore, there exist realistic cases in which one can be interested in retaining only integers or filtering out only specific data types.
this doesn't filter out the strings but allows only ints. If the source data had booleans or other data types this algo would lose all those other types and only preserve ints, which is not accurate to the request.
best
Indeed many solutions directly filter out string values and leave everything else in the list, but as @Chrono79 said the Kata input only consists in intgeres and strings.
Furthermore, there exist realistic cases in which one can be interested in retaining only integers or filtering out only specific data types.
The input contains only non-negative integers and strings.
this doesn't filter out the strings but allows only ints. If the source data had booleans or other data types this algo would lose all those other types and only preserve ints, which is not accurate to the request.
This comment is hidden because it contains spoiler information about the solution
Clever, but I don't think this is really best practices.
This comment is hidden because it contains spoiler information about the solution
thanks for your explaination. I got stuck at that
This comment is hidden because it contains spoiler information about the solution