Skip to content

Added ransom solution #7

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

Merged
merged 1 commit into from
May 18, 2015
Merged

Added ransom solution #7

merged 1 commit into from
May 18, 2015

Conversation

prestonvanloon
Copy link
Contributor

I didn't see this folder in here, but I took the time to type this one out so I figured I would submit!

@bcjordan
Copy link
Member

Awesome, looks great!

bcjordan added a commit that referenced this pull request May 18, 2015
@bcjordan bcjordan merged commit f9ab8b3 into codingforinterviews:master May 18, 2015
public void testCanRansom() throws Exception {
boolean yayRansom = Ransom.canRansom("dying wool is what you will be doing", "you will be dying");
System.out.println("You " + (yayRansom ? "can" : "can't") + " write a ransom letter");
boolean failRansom = Ransom.canRansom("can you believe Justin Beiber's new shirt?", "give me all your money");
Copy link
Member

Choose a reason for hiding this comment

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

😆

@dideler
Copy link

dideler commented May 30, 2015

Missing README w/ problem description 😢

@prestonvanloon prestonvanloon deleted the Ransom branch May 30, 2015 16:01
@prestonvanloon
Copy link
Contributor Author

Oh yeah, this is from lecture 48. The problem is:

Given a magazine and a ransom note, figure out if you can cut some words out of the magazine to write the ransom note.

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.

3 participants