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

Trang Frego - Matrix Convert to Zero #14

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

Conversation

tfrego
Copy link

@tfrego tfrego commented Oct 29, 2018

No description provided.

@shrutivanw
Copy link

Nicely done!

The only further optimization I could think about was to use the 0th row and 0th column of the input matrix to track which columns and rows should be converted to zeroes. This improves the space complexity to O(1). Here's my attempt: https://github.com/Ada-C10/matrix_convert_to_zero/blob/solution/lib/matrix_convert_to_zero.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