25. Diagonal of a Matrix Product

Medium

Return only the diagonal of A @ B as a 1-D tensor, without materializing the full n×n product matrix.

Sign in to write and run your own code.

Implement solve(...)