上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 79 下一页
摘要: package LeetCode_787 import java.util.* import kotlin.collections.ArrayList import kotlin.collections.HashMap /** * 787. Cheapest Flights Within K Sto 阅读全文
posted @ 2020-06-16 12:37 johnny_zhao 阅读(160) 评论(0) 推荐(0) 编辑
摘要: package _Algorithm.BellmanFord class BellmanFord { //create graph val ab = Edge("A", "B", -1) val ac = Edge("A", "C", 4) val bc = Edge("B", "C", 3) va 阅读全文
posted @ 2020-06-16 11:21 johnny_zhao 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 什么是Bellman-Ford算法? Bellman-Ford,是求解单源最短路经问题的一种算法,由Richard Bellman和莱斯特.福特创立的。它的原理是对图进行|V|-1次松弛操作,得到所有可能的最短路经。其优于Dijkstra的方面是边的权值可以为负数、实现简单,缺点是时间复杂度高,高达 阅读全文
posted @ 2020-06-15 11:55 johnny_zhao 阅读(396) 评论(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 阅读(118) 评论(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 阅读(210) 评论(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 阅读(141) 评论(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 阅读(135) 评论(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 阅读(156) 评论(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 阅读(124) 评论(0) 推荐(0) 编辑
上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 79 下一页