07 2016 档案

摘要:题目: 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梦 阅读(200) 评论(0) 推荐(0)
摘要:最短路径:对于网图来说,最短路径是指两个顶点之间经过的边上权值之和最少的路径,并且我们称路径上的第一个顶点式源点,最后一个顶点是终点。以下图为例, 寻找v0到v8的最短距离。 对应解决思路:现在比较成熟的有Dijkstra(迪杰斯特拉)算法和Flord算法算法。 Dijkstra(迪杰斯特拉)算法 阅读全文
posted @ 2016-07-13 10:12 大雄的哆啦A梦 阅读(419) 评论(0) 推荐(0)
摘要:原题: The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11.11 is rea 阅读全文
posted @ 2016-07-03 23:01 大雄的哆啦A梦 阅读(331) 评论(0) 推荐(0)
摘要:迭代器是C++标准库中的重要组件,特别是在容器内部,没有迭代器,容器也就无所谓存在了。 例如:vector容器简而言之就是3个迭代器 start finish 以及end_of_storage vector的任何操作都离不开这3个迭代器。。 接下来,总结一下C++ 中的迭代器的操作。 C++的迭代器 阅读全文
posted @ 2016-07-01 21:18 大雄的哆啦A梦 阅读(626) 评论(0) 推荐(0)