上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 79 下一页
摘要: 什么是Bellman-Ford算法? Bellman-Ford,是求解单源最短路经问题的一种算法,由Richard Bellman和莱斯特.福特创立的。它的原理是对图进行|V|-1次松弛操作,得到所有可能的最短路经。其优于Dijkstra的方面是边的权值可以为负数、实现简单,缺点是时间复杂度高,高达 阅读全文
posted @ 2020-06-15 11:55 johnny_zhao 阅读(385) 评论(0) 推荐(0) 编辑
摘要: package LeetCode_941 /** * 941. Valid Mountain Array * https://leetcode.com/problems/valid-mountain-array/description/ * * Given an array A of integer 阅读全文
posted @ 2020-06-14 21:20 johnny_zhao 阅读(117) 评论(0) 推荐(0) 编辑
摘要: package LeetCode_1475 import java.util.* /** * 1475. Final Prices With a Special Discount in a Shop * https://leetcode.com/problems/final-prices-with- 阅读全文
posted @ 2020-06-14 20:56 johnny_zhao 阅读(214) 评论(0) 推荐(0) 编辑
摘要: package LeetCode_282 /** * 282. Expression Add Operators * https://leetcode.com/problems/expression-add-operators/description/ * * Given a string that 阅读全文
posted @ 2020-06-14 19:51 johnny_zhao 阅读(207) 评论(0) 推荐(0) 编辑
摘要: package LeetCode_503 import java.util.* /** * 503. Next Greater Element II * https://leetcode.com/problems/next-greater-element-ii/description/ * * Gi 阅读全文
posted @ 2020-06-14 12:44 johnny_zhao 阅读(140) 评论(0) 推荐(0) 编辑
摘要: package LeetCode_227 import java.util.* /** * 227. Basic Calculator II * https://leetcode.com/problems/basic-calculator-ii/description/ * * Implement 阅读全文
posted @ 2020-06-13 22:07 johnny_zhao 阅读(133) 评论(0) 推荐(0) 编辑
摘要: package LeetCode_224 import java.util.* /** * 224. Basic Calculator * https://leetcode.com/problems/basic-calculator/description/ * * Implement a basi 阅读全文
posted @ 2020-06-13 18:30 johnny_zhao 阅读(154) 评论(0) 推荐(0) 编辑
摘要: package LeetCode_40 /** * 40. Combination Sum II * https://leetcode.com/problems/combination-sum-ii/description/ * * Given a collection of candidate n 阅读全文
posted @ 2020-06-13 15:37 johnny_zhao 阅读(121) 评论(0) 推荐(0) 编辑
摘要: package _interview_question /** * Check if a given target element is found in the infinite long sorted array. * */ class Solution8 { /** * solution: b 阅读全文
posted @ 2020-06-13 13:11 johnny_zhao 阅读(137) 评论(0) 推荐(0) 编辑
摘要: package LeetCode_280 /** * 280. Wiggle Sort * (locked by leetcode) * https://www.lintcode.com/problem/wiggle-sort/description * * Given an unsorted ar 阅读全文
posted @ 2020-06-12 21:56 johnny_zhao 阅读(152) 评论(0) 推荐(0) 编辑
上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 79 下一页