Skip to content

Instantly share code, notes, and snippets.

@rastalamm
Forked from jaywon/gist:c76abc57dc33e1679c02
Last active August 29, 2015 14:22
Show Gist options
  • Save rastalamm/4b69eb72ed19bc4de09d to your computer and use it in GitHub Desktop.
Save rastalamm/4b69eb72ed19bc4de09d to your computer and use it in GitHub Desktop.

###Good Morning - June 1, 2015

Your challenge this morning is to create a function that implements an algorithm using the concepts we covered last week.

###Challenge

  1. Write an algorithm that takes in 2 strings(source, find).
  2. Return true if the word passed in as the find parameter is in the source if it were circular. Meaning there is no end to source word. A match would be true if the word to find is partially at the end of the word and at the beginning in sequence.

Ex.

Source: Hotdog

Target: dog

Return: true

Source: Assignments

Target: sass

Return: true

Source: Assignments

Target: sassy

Return: false

####Please don't share your answer and if you move on do the following

Your mission: Write a blog post explaining closures to a child.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment