Skip to content

Conversation

@theomoondev
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