Company: ibm_12oct
Difficulty: medium
Form String from Words Problem Description Given a string s and an array of words, check whether s can be formed by concatenating strings from array of words in any order. Note: If you have used a word from words, then the same word cannot be used twice unless the same word is repeated in array of words Return: true or false if we can form the input string s , by choosing some words in some order from given array words. Examples Example 1: Input: s = "ILoveIBM", words = ["I", "YOU", "IBM", "Love", "We"] Output: true Explanation: If we concat words[0], words[3], words[2], then string "ILoveIBM" can be formed. Example 2: Input: s = "AllTheBest", words = ["best", "of", "Luck", "All"] Output: false Explanation: string "AllTheBest" cannot be formed any given words from the array "words".