The use of nested Hashtables
Sometimes a solution to a problem requires the use of nested hash-tables, that is, a hash table whose values are other hash tables. This problem exemplifies this technique. It comes from Leetcode, here it is: https://leetcode.com/problems/sentence-similarity/description/ : Given two sentences words1, words2 (each represented as an array of strings), and a list of similar word pairs pairs , determine if two sentences are similar. For example, "great acting skills" and "fine drama talent" are similar, if the similar word pairs are pairs = [["great", "fine"], ["acting","drama"], ["skills","talent"]] . Note that the similarity relation is not transitive. For example, if "great" and "fine" are similar, and "fine" and "good" are similar, "great" and "good" are not necessarily similar. However, similarity is symmetric. For example, "g...