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

Space - Lee #35

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Space - Lee #35

wants to merge 22 commits into from

Conversation

peachmakkoli
Copy link

No description provided.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Good work, you hit most of all the learning goals here. Well done.

Take a look at my comments and let me know if you have any questions.

@@ -1,3 +1,17 @@
def intersection(list1, list2)

Choose a reason for hiding this comment

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

👍

Comment on lines 10 to 14
if string.length.even? # the palindrome should have two of each letter
return lookup_hash.length == string.length / 2
elsif string.length.odd? # the palindrome should have only one odd letter out
return lookup_hash.length == (string.length / 2) + 1
end

Choose a reason for hiding this comment

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

I don't think this would work if a letter appears more than 2 times. Consider oooo, it's a palindrome, if a weird one.

@@ -1,4 +1,28 @@

def permutations?(string1, string2)

Choose a reason for hiding this comment

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

👍 I think this could be simplified a bit, but otherwise well done.

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