问题描述: 比较两个字符串A和B,确定A中是否包含B中所有的字符.字符串A和B中的字符都是 大写字母. 样例 给出 A = "ABCD" B = "ACD",返回 true 给出 A = "ABCD" B = "AABC", 返回 false 注意事项 在 A 中出现的 B 字符串里的字符不需要连续或者有序. 问题分析: 实质上利用的是哈希表的思想.只有大写字母,一共26个,遍历A的时候,往里面压,遍历B的时候,往外边弹,如果…
Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be replaced with another character while preserving the order of characters.…