
oj
文章平均质量分 70
BrcLi
这个作者很懒,什么都没留下…
展开
-
hdu图论题目
=============================以下是最小生成树+并查集======================================【HDU】1213 How Many Tables 基础并查集★1272 小希的迷宫 基础并查集★1325&&poj1308 Is It A Tree? 基础并查集★1856 More is better转载 2017-07-30 13:53:53 · 2053 阅读 · 0 评论 -
Leetcode495 Teemo Attacting
// C++In LOL world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascending time series towards Ashe and the poison原创 2017-08-09 22:40:55 · 643 阅读 · 0 评论 -
Leetcode 142. Linked List Cycle II
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked list.题意:找到循环链表的循环开始位置设置快指针一次走2步和慢指针一次走1步同时遍历链表,若快指针最后和慢指针指向同一节原创 2017-08-13 17:22:24 · 377 阅读 · 0 评论 -
最大子序列和
求最大子序列的和是一道经典的动态规划题目:给一个数组,求出数组中和最大的子序列,输出最大的和,有些题目还需要输出子序列的开始和结束位置:题目参考:LeetCode :https://leetcode.com/problems/maximum-subarray/description/hdoj :http://acm.hdu.edu.cn/showproblem.php?pid=100原创 2017-08-13 12:50:16 · 608 阅读 · 0 评论 -
Leetcode :Intersection of Two Arrays 两个数组的交集
LeetCode349. Intersection of Two ArraysGiven two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].Note:Each原创 2017-08-12 09:45:54 · 362 阅读 · 0 评论