摘要: 题目: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the 阅读全文
posted @ 2016-07-13 10:26 大雄的哆啦A梦 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 最短路径:对于网图来说,最短路径是指两个顶点之间经过的边上权值之和最少的路径,并且我们称路径上的第一个顶点式源点,最后一个顶点是终点。以下图为例, 寻找v0到v8的最短距离。 对应解决思路:现在比较成熟的有Dijkstra(迪杰斯特拉)算法和Flord算法算法。 Dijkstra(迪杰斯特拉)算法 阅读全文
posted @ 2016-07-13 10:12 大雄的哆啦A梦 阅读(395) 评论(0) 推荐(0) 编辑