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

Solution for Issue #3, mutations, in python #163

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

Solution for Issue #3, mutations, in python #163

wants to merge 1 commit into from

Conversation

bpbrum
Copy link

@bpbrum bpbrum commented Oct 24, 2019

Dear the-vampiire,
this is my first pull request! I hope it works out fine.

Approach / Thought Process
My approach was to first make both strings comparable (both were set to lower case) and then to compare each letter from the second string against the first string. I ended up doing it by transforming the first string into a list for reasons discussed in the section below.

Problems during the solution process
The main issue I had was making sure that the same letter in the first string couldn't be "used twice". I ended up solving it by transforming the first string into a list and removing each letter as it was used.

Instructions to run
The python file is set to run the tests (hardcoded into name=="main"), but the mutations function can be imported separately and ran. The input is a list of two strings, in which the second string will be tested against the first.

-- bpbrum

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.

1 participant