Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sigrid Benezra - Edges - Matrix conver to zero #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sdbenezra
Copy link

With the assumption that n represents the number of rows, and m represents the number of columns, the time complexity is O(n x m) because my program nests iteration over columns and rows. And although I run through a nested loop three times in the program, dropping coefficients means the equation boils down to O(n x m).

The space complexity is O(m) due to the use of an array to keep track of the columns in which a zero is found when iterating over a row, and in the worst case where every element is a 0 in a row, the array length would match the number of columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant