Runtime explanation
MichaelWehar opened this issue · 2 comments
MichaelWehar commented
Brief explanation of O(m*n) runtime.
For the Java code:
-
If m >= n, then the runtime is roughly O(m*n + n^2) = O(m*n) because there are roughly n^2 possible pairs of columns
-
If m < n, then the runtime is roughly O(m*n + m^2) = O(m*n) because there are roughly m^2 possible pairs of rows
MichaelWehar commented
If anyone would like to elaborate or improve the explanation, please feel free to comment below or submit a pull request. Thank you. :)
MichaelWehar commented
Added description to readme.