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

Updated matrix method, brute force, time complexity is 2n #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

danimetz
Copy link

Time Complexity: O(n^2)
Space Complexity: O(2n)

@shrutivanw
Copy link

Nice work!

Since the problem statement encouraged you to optimize the space complexity as much as possible, can you think of how you could tweak your algorithm to have a space complexity of O(1)? Once you have given it some more thought, tally your solution with mine here: https://github.com/Ada-C10/matrix_check_sum/blob/solution/lib/matrix_check_sum.rb

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.

2 participants