โ† Fidelity Investments questions
CodingReported in a candidate post, Aug 2021

Convert matrix to square and sum diagonals based on conditions

Filed under Fidelity Investments

The question

Given a matrix, convert it into a square matrix by appending 1s, and sum the diagonal elements where the diagonal element appears an odd number of times outside the diagonal.

No write-up yet. Related questions below have one.

Related Fidelity Investments questions

Collected from public candidate posts and coding forums. Updated Nov 2026.