Ad
  • Custom User Avatar

    I agree mostly, but the instructions do say that the incoming data is lists of non-nengative integers and strings. So the arrays have two types of data. So either way accomplishes the goal. However I do prefer to filter our strings for the reason mentioned that in the future should more data types be added then this function still does it's task without changes. Since the task was to remove strings and not return numbers. The top rated one would require rework to function correctly if other data types were added in the future, so I fail to see why it's "best practice"