leetcode
1605. Find Valid Matrix Given Row and Column Sums
Solution code
Time complexity: O(n m)
Space complexity: O(1)