This problem does not indicate that upper should be less or equal than the last element in nums.
I've tried a case as below:
I think the correct answer should be ["2", "4"].
It seems there is not such case in the test set.
Quite right to question it. The question should be worded better, but I think "where the range of elements are [lower, upper] inclusive" means that the input will always be bound by
upper. It probably should say something like "where the range of elements are in the inclusive range [lower, upper]".
@alexbowe Thanks, I have revised the description based on your comment.