I have a symmetric matrix S(n*n) where approximately 70% of the data are 0.
I want to convert the symmetric matrix into a sparse matrix with t rows.
What would be the time complexity of generating a sparse matrix from the original symmetric matrix?
Is it O(n^2), because I have to go through every row/column intersection and get the elements that are not 0?
Since I am dealing with a symmetric matrix, can I can say that my time complexity could reduce to O((n*(n+1))/2) because in symmetric matrix a[i][j]= a[j][i]? In this case I could say a[j][i]=0 if I encounter a[i][j] as 0. This could reduce my loops by approximately half.