Skip to content

Instantly share code, notes, and snippets.

@brianspiering
Last active December 15, 2021 12:17
Show Gist options
  • Save brianspiering/ee99f83c02321d0eb7bf47c45aec0f31 to your computer and use it in GitHub Desktop.
Save brianspiering/ee99f83c02321d0eb7bf47c45aec0f31 to your computer and use it in GitHub Desktop.
Is Substring Problem

Is Substring Problem

Problem Statement

Given a short string and long string, find if the shorter string is a substring of the longer string.

Common Questions

  • Q: Can I use built-in string methods?
    • A: No
  • Q: Can I use in?
    • A: No
  • Q: Should I care about case?
    • A: Yes - It needs to be an exact character match
  • Q: Can the strings be empty?
    • A: Assume both strings are not empty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment