InterviewDB Experience

Encoded Matrix: Decode a 2D Matrix Encoded with Row and Column XOR Checksums

Interview Experience

Problem You are given an (m+1) x (n+1) matrix where the last row contains the XOR of each column and the last column contains the XOR of each row. One cell in the original m x n region is corrupted (flipped bits). Find the coordinates of the corrupted cell and restore its correct value. Follow-ups Prove that XOR of a row and its checksum equals 0 when uncorrupted. How does corruption change this? What if two cells are corrupted? Can you still detect and fix them with this scheme? How does this r…

Full Details

🔒

Unlock all Instacart questions

Full insider details, leaked discussions, and candidate experiences.

or every company, $100/year →

About This Question

This is a candidate experience report from a instacart interview during the onsite round.

It covers the following topics: Bit Manipulation, Coding, Onsite, Matrix .