摘要:
import java.util.TreeMap; class MapSum { /** * 本题中每个节点还有一个对应的val,可以替代isWord的作用 */ class Node{ int val; TreeMap<Character, Node> next; public Node(int 阅读全文
摘要:
import java.util.TreeMap; class WordDictionary { class Node{ boolean isWord; TreeMap<Character, Node> next; public Node(){ isWord = false; next = new 阅读全文
摘要:
import java.util.TreeMap; class Trie { class Node{ boolean isWord; TreeMap<Character, Node> next; public Node(){ next = new TreeMap<>(); isWord = fals 阅读全文
摘要:
class NumArray { SegmentTree segmentTree; public NumArray(int[] nums) { segmentTree = new SegmentTree(nums); } public void update(int index, int val) 阅读全文