面试中最常考的算法题主要是:数组、二叉树。

    期中呢,HashMap、HashSet等辅助数据结构使用比较多,
    “双指针法”在有序数组相关算法题中使用较多;
    无序数组,使用HashMap和HashSet较多;
    二叉树大多使用递归、dfs来解题。

    股票问题:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-iii/solution/yi-ge-tong-yong-fang-fa-tuan-mie-6-dao-gu-piao-wen/

    股票有冷冻期
    https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/solution/ji-yu-zhuang-tai-ji-de-dong-tai-gui-hua-geng-jia-t/

    回溯算法
    https://leetcode-cn.com/problems/combination-sum/solution/hui-su-suan-fa-tao-mo-ban-ji-ke-by-jeromememory/
    https://leetcode-cn.com/problems/combination-sum/solution/xue-yi-tao-zou-tian-xia-hui-su-suan-fa-by-powcai/

    1. result = []
    2. def backtrack(路径, 选择列表):
    3. if 满足结束条件:
    4. result.add(路径)
    5. return
    6. for 选择 in 选择列表:
    7. 做选择
    8. backtrack(路径, 选择列表)
    9. 撤销选择

    高频面试系列
    https://github.com/labuladong/fucking-algorithm/tree/master/%E9%AB%98%E9%A2%91%E9%9D%A2%E8%AF%95%E7%B3%BB%E5%88%97

    排序
    双轴快排 https://www.jianshu.com/p/bb5e34f00ac6
    https://www.jianshu.com/p/6d26d525bb96
    https://www.jianshu.com/p/10aa41b780f2
    https://www.cnblogs.com/strive-x/p/10302042.html