摘要:
区域与检索--数组可修改 线段树 参考 链接 代码 class NumArray { private ArrayList<Integer> sumSegmentTree; private int n; public NumArray(int[] nums) { n = nums.length; su 阅读全文
摘要:
同构字符串 给定两个字符串 s 和 t,判断它们是否是同构的。 如果 s 中的字符可以被替换得到 t ,那么这两个字符串是同构的。 所有出现的字符都必须用另一个字符替换,同时保留字符的顺序。两个字符不能映射到同一个字符上,但字符可以映射自己本身。 使用HashMap解决 class Solution 阅读全文