Walmart | 2021 | SDE OA

Is there an efficient way to solve this problem?

image
image

Comments (3)