Given a list of words return a Map of words which can be formed by using other words which exist in the same list.
input = [“happy”, “rise”, “for”, “set”, “sunrise”, “su”, “nset”, “sunset”, “mind”, “happymind”, “n”, “rise”, “happysunrise”]
output = {
“happymind” : [[“happy”, “mind]],
“sunrise” : [[“su”, “n”, “rise”], [“sun”, “rise”]],
“sunset” : [[“sun”, “set”], [“su”, “n”, “set]],
“happysunrise” : [[“happy”, “sunrise”], [“happy”, “sun”, “rise”], [“happy”, “su”, “n”,
“rise”]]
}