期望: 每周一个 Algorithm,Review 一篇英文文章,总结一个工作中的技术 Tip,以及 Share 一个传递价值观的东西! Algorithm: 学习算法 Two Sum IV - Input is a BST 仍然是Two Sum,输入换成了二叉搜索树.Two Sum的套路就是固定一个数,然后利用特定数据结构来查找另一个数.如果要返回下标,就需要value-index的二元组,用Map合适.这题只需返回是否存在,因此只需用Set就可以. 所以精髓就是利用Set来存储已经遍历的no…
ARTS: Algrothm: leetcode算法题目 Review: 阅读并且点评一篇英文技术文章 Tip/Techni: 学习一个技术技巧 Share: 分享一篇有观点和思考的技术文章 Algorithm [leetcode]557. Reverse Words in a String III https://leetcode.com/problems/reverse-words-in-a-string-iii/ 1)problem Given a string, you need to…
ARTS: Algrothm: leetcode算法题目 Review: 阅读并且点评一篇英文技术文章 Tip/Techni: 学习一个技术技巧 Share: 分享一篇有观点和思考的技术文章 Algorithm [leetcode]14. Longest Common Prefix https://leetcode.com/problems/longest-common-prefix/ 1)problem Write a function to find the longest common p…