• 底层实现
      • TreeSet
        • 红黑树
          • 性质1. 节点是红色或黑色。
          • 性质2. 根节点是黑色。
          • 性质3.所有叶子都是黑色。(叶子是NUIL节点)
          • 性质4. 每个红色节点的两个子节点都是黑色。(从每个叶子到根的所有路径上不能有两个连续的红色节点)
          • 性质5.. 从任一节点到其每个叶子的所有路径都包含相同数目的黑色节点。


    • PriorityQueue
      • 二叉堆结构
    • 常用API
      • String
        • substring(start); substring(start, end)
        • toCharArray();
    1. Deque<Character> stack = new LinkedList<Character>();
    2. Arrays.sort(args);
    3. PriorityQueue<Integer> pq = new PriorityQueue();
    4. PriorityQueue<Integer> pq2 = new PriorityQueue<Integer> ((a,b) -> {
    5. return a - b;
    6. });
    7. HashMap map = new HashMap();
    8. map.putIfAbsent(1, 1);
    9. map.containsKey(1);
    10. map.containsValue(1);
    11. map.getOrDefault(3, 2);
    12. System.out.println(map);