From f5f2daf349ed8f7d68d052b56e5e197b3ad283c1 Mon Sep 17 00:00:00 2001 From: Jim Infield Date: Tue, 10 Aug 2021 09:43:48 -0500 Subject: [PATCH] add README --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b5daf0f --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +## Which Are In? + +Given two arrays of strings a1 and a2 return a sorted array r in lexicographical order of the strings of a1 which are substrings of strings of a2. + +**Example 1:** +``` +a1 = ["arp", "live", "strong"] + +a2 = ["lively", "alive", "harp", "sharp", "armstrong"] + +returns ["arp", "live", "strong"] +``` +**Example 2:** +``` +a1 = ["tarp", "mice", "bull"] + +a2 = ["lively", "alive", "harp", "sharp", "armstrong"] + +returns [] +``` +**Notes:** + +Arrays are written in "general" notation. See "Your Test Cases" for examples in your language. +In Shell bash a1 and a2 are strings. The return is a string where words are separated by commas. +Beware: r must be without duplicates.