Build a Matrix With Conditions

Build a Matrix With Conditions - Coding Problem | K5kC