He asked me to write a function to detect whether string1 contains all letters in string2
Anonymous
Traverse string2 and create a map where the characters of string2 are used as keys. Then traverse string1. If the the character in string1 exists in the map, remove the key from the map. At the end if your map has anything in it, string1 did not contain all of the characters.
Check out your Company Bowl for anonymous work chats.