Diagonal Matrix Ordering - Coding problem | OneNoughtOne