上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 79 下一页
摘要: /** * 687. Longest Univalue Path(最长的相同值路经) * https://leetcode.com/problems/longest-univalue-path/description/ * https://www.youtube.com/watch?v=yX1hVh 阅读全文
posted @ 2020-01-06 00:53 johnny_zhao 阅读(148) 评论(0) 推荐(0) 编辑
摘要: /** *543. Diameter of Binary Tree * https://leetcode.com/problems/diameter-of-binary-tree/description/ * */class TreeNode(var `val`: Int) { var left: 阅读全文
posted @ 2020-01-05 01:23 johnny_zhao 阅读(153) 评论(0) 推荐(0) 编辑
摘要: class LargestRangeOfArray { /* * Given an array of integers, return the largest range, inclusive, of integers that are all included in the array. For 阅读全文
posted @ 2019-12-24 17:00 johnny_zhao 阅读(334) 评论(0) 推荐(0) 编辑
摘要: /** * 112. Path Sum * https://leetcode.com/problems/path-sum/description/ * * Given a binary tree and a sum, * determine if the tree has a root-to-lea 阅读全文
posted @ 2019-12-19 16:20 johnny_zhao 阅读(133) 评论(0) 推荐(0) 编辑
摘要: import java.util.* import kotlin.collections.ArrayList /** * Lock by leetcode * 272. Closest Binary Search Tree Value II * https://www.lintcode.com/pr 阅读全文
posted @ 2019-12-13 01:36 johnny_zhao 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 什么是最小生成树? 一个有n个结点的连通图的生成树是原图的极小连通子图,且包含原图中的所有n个结点,并且有保持图连通的最少的边。最小生成树可以用Kruskal算法或Prim算法求出。 在一给定的无向图g=(V,E)中,(u,v)代表连接顶点u与顶点v的边,而w(u,v)代表此边的权重,若存在T为E 阅读全文
posted @ 2019-11-24 10:19 johnny_zhao 阅读(218) 评论(0) 推荐(0) 编辑
摘要: import java.util.* import kotlin.collections.ArrayList /** * 373. Find K Pairs with Smallest Sums * https://leetcode.com/problems/find-k-pairs-with-sm 阅读全文
posted @ 2019-11-17 15:25 johnny_zhao 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 记录下 阅读全文
posted @ 2019-11-08 15:24 johnny_zhao 阅读(396) 评论(0) 推荐(0) 编辑
摘要: /**Given a string, determine if a permutation of the string could form a palindrome. Example Input: s = "code" Output: False Input: s = "carerac" Output: True Explanation: "carerac" --> "carerac"... 阅读全文
posted @ 2019-11-03 23:27 johnny_zhao 阅读(112) 评论(0) 推荐(0) 编辑
摘要: /** * 53. Maximum Subarray * https://leetcode.com/problems/maximum-subarray/description/ * https://www.cnblogs.com/grandyang/p/4377150.html * Given an integer array nums, * find the contiguous subarra 阅读全文
posted @ 2019-10-30 00:08 johnny_zhao 阅读(153) 评论(0) 推荐(0) 编辑
上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 79 下一页