You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The min/max builtins will give the flattened integer on multi-dimensional list arguments, which is a great feature I've used a lot of times.
However, there seems to be unexpected behavior when a list of lists of integers includes an empty list. At first I thought it ignored all integers after the last empty list, but apparently that's not the case either.
For example, with list [[0, 5], [], [2], [3, 1]], I'd expect the flattened maximum to be 5, but it returns 3 instead.
The min/max builtins will give the flattened integer on multi-dimensional list arguments, which is a great feature I've used a lot of times.
However, there seems to be unexpected behavior when a list of lists of integers includes an empty list. At first I thought it ignored all integers after the last empty list, but apparently that's not the case either.
For example, with list
[[0, 5], [], [2], [3, 1]]
, I'd expect the flattened maximum to be5
, but it returns3
instead.Try it online. The first and last test cases are currently wrong (I'm expecting
5
and1
instead of3
and0
respectively); the other three are correct.Found in this 05AB1E answer of mine. - Try it online (expecting
1
, but got0
).The text was updated successfully, but these errors were encountered: