LeetCode Weekly Contest 94
杨领well
君子食无求饱,居无求安,敏于事而慎于言,就有道而正焉。
展开
-
LeetCode: Weekly Contest 94
LeetCode: Weekly Contest 94题解列表1. LeetCode: 872. Leaf-Similar Trees 题解 签到题。分别中序遍历两棵树,按顺序记录各自的叶子,然后比较是否相等。2.LeetCode: 874. Walking Robot Simulation 题解 模拟机器人行走的过程,并记录到达的每个位置与原点的距离的最大值。...原创 2018-07-22 12:54:06 · 215 阅读 · 0 评论 -
LeetCode: 872. Leaf-Similar Trees
LeetCode: 872. Leaf-Similar Trees题目描述Consider all the leaves of a binary tree. From left to right order, the values of those leaves form a leaf value sequence. For example, in the given tree a...原创 2018-07-22 12:57:47 · 797 阅读 · 1 评论 -
LeetCode: 874. Walking Robot Simulation
LeetCode: 874. Walking Robot Simulation题目描述A robot on an infinite grid starts at point (0, 0) and faces north. The robot can receive one of three possible types of commands:-2: turn left 90 d...原创 2018-07-22 13:02:37 · 550 阅读 · 0 评论 -
LeetCode: 875. Koko Eating Bananas
LeetCode: 875. Koko Eating Bananas题目描述Koko loves to eat bananas. There are N piles of bananas, the i-th pile has piles[i] bananas. The guards have gone and will come back in H hours. Koko can...原创 2018-07-22 13:05:56 · 461 阅读 · 0 评论 -
LeetCode: 873. Length of Longest Fibonacci Subsequence
LeetCode: 873. Length of Longest Fibonacci Subsequence题目描述A sequence X_1, X_2, …, X_n is fibonacci-like if:n >= 3X_i + X_{i+1} = X_{i+2} for all i + 2 <= nGiven a strictly increasing ar...原创 2018-07-22 13:09:58 · 916 阅读 · 0 评论