新农上路
- 积分
- 99
- 大米
- 颗
- 鳄梨
- 个
- 水井
- 尺
- 蓝莓
- 颗
- 萝卜
- 根
- 小米
- 粒
- 学分
- 个
- 注册时间
- 2012-5-7
- 最后登录
- 1970-1-1
|
本帖最后由 jpf1983 于 2020-6-15 13:55 编辑
day 9-- 9道题
809. Expressive Words groupby, staightforward
477. Total Hamming Distance loop over bits "{:032b}".format(num)
1123. Lowest Common Ancestor of Deepest Leaves DFS while return two value (depth, common ancestor). for each node, if left node depth is equal to right node depth, then common ancestor is current node, else common ancestor is the dfs of higher depth son.
481. Magical String straight forward. list.count() function
486 Predict the Winner dp from up to bottom
518. Coin Change 2 outer loop coin inner loop amount. similar with knapsack problem. different with combination V.
484 Find Permutation stack or two pointer
487. Max Consecutive Ones II two pinters
490. The Maze bfs |
|