<@UM8QX9WKA> ```val last = (0..3).flatMap { x -&gt...
# codereview
v
@LastExceed
Copy code
val last = (0..3).flatMap { x ->
    (0..3).map { y ->
        offsets.sumBy { (first, second) ->
            arr[y + second][x + first]
        }
    }
}.max()
l
this is what i was looking for, thanks! btw please use threads instead of top level messages for replies in the future