Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 874 Bytes

File metadata and controls

31 lines (20 loc) · 874 Bytes

Is substring

Given two strings implement a method which determines whether the characters in the second string is a substring of the characters in the first string (check if second string exists as continuous/unbroken chain of characters the first string).

Limitations

Don't use contains method on String class.

Examples

isSubstring("go home", "ome") // true

isSubstring("go home", "me") // true

isSubstring("go home", "abc") // false

Getting Started

This repository contains a class that returns true. Replace the body of the class with an implementation which will return true or false to satisfy the above criteria. We have already created some tests (JUnit5) which need to pass.

  1. Clone the repository
  2. Create a branch
  3. Write the implementation
  4. Commit your code with a suitable commit message
  5. Create a pull request