Sponsored
Use these hints if you're stuck. Try solving on your own first.
Try to solve it in one dimension first. How can this solution apply to the two dimension case?
Solve with full IDE support and test cases