Skip to content

Branches - Macaria#21

Open
mdove92 wants to merge 1 commit into
Ada-C12:masterfrom
mdove92:master
Open

Branches - Macaria#21
mdove92 wants to merge 1 commit into
Ada-C12:masterfrom
mdove92:master

Conversation

@mdove92

@mdove92 mdove92 commented Sep 16, 2019

Copy link
Copy Markdown

No description provided.

@CheezItMan CheezItMan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice work, you did well especially with the Big-O, and both methods work. Well done!

Comment thread lib/practice_exercises.rb

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Correct!

Comment thread lib/practice_exercises.rb
# Space Complexity: 0(1)
def longest_prefix(strings)
raise NotImplementedError, "Not implemented yet"
max_prefix = strings.min

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe use min_by so you can get the smallest by length.

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