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

contents: add tip on traversing arrays #171

Merged
merged 1 commit into from
Aug 3, 2020

Conversation

rafatbiin
Copy link
Contributor

while solving the Product of Array Except Self I saw that traversing the array twice helped me solve the problem easily in O(n) time complexity. adding the line will make the interviewee free from the mental barrier that they can traverse the array more than once even if the time complexity asked is O(n).

Copy link
Owner

@yangshun yangshun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit. Thanks!

@yangshun yangshun changed the title Add a Line on Array Notes contents: add tip on traversing arrays Aug 3, 2020
@yangshun yangshun merged commit 256c384 into yangshun:master Aug 3, 2020
@rafatbiin rafatbiin deleted the rafatbiin-patch-1 branch August 3, 2020 07:33
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