自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

willinux的专栏

因为我能看得见,始终能看得见,始终能看得见自己。

  • 博客(12)
  • 资源 (3)
  • 收藏
  • 关注

原创 extern C的作用详解

https://blog.csdn.net/jiqiren007/article/details/5933599

2020-05-28 14:43:58 607

原创 817. Linked List Components

Description:We are given head, the head node of a linked list containing unique integer values.We are also given the list G, a subset of the values in the linked list.Return the number of connected components in G, where two values are connected if they

2020-05-27 10:45:12 147

转载 libevent中TAILQ_QUEUE队列的使用

https://blog.csdn.net/luotuo44/article/details/38374009

2020-05-20 17:38:48 160

原创 148. Sort List

Description:Sort a linked list in O(n log n) time using constant space complexity.Analysis:147是插入排序,时间复杂度O(N^2),这里要求O(n log n),快排满足要求。快排是用分治的思想,将链表分成两个子链表分别排序,然后再合并链表。Solution:class Solution {public: ListNode* sortList(ListNode* head) {

2020-05-18 12:19:31 110

原创 147. Insertion Sort List

Description:Sort a linked list using insertion sort.Analysis:插入排序,时间复杂度O(N^2)创建一个dummy node,方便从head开始遍历。可以结合题目148一起看。两种解法:解法一:断开链表,分成两个链表,链表1是有序链表,链表2是待排序链表,依次将链表2中的元素插入到链表1的有序链表中;解法二:不断开链表,依次移动结点,移动结点后,依然保持链表不断开。Solution1:class Solution {publ

2020-05-18 10:42:02 234

原创 42. Trapping Rain Water

Description:Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.Analysis:1.直接的想法(not AC)找到一个“V”型区间,区间中间就是每个区间可以接的水。提交后,发现有case错误,原来这种解法相当于是贪心,没办法对求对全局的ca

2020-05-14 18:04:48 97

原创 56. Merge Intervals

Description:Given a collection of intervals, merge all overlapping intervals.Example 1:Input: [[1,3],[2,6],[8,10],[15,18]]Output: [[1,6],[8,10],[15,18]]Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6].Example 2:Input: [[1

2020-05-12 21:03:55 109

原创 986. Interval List Intersections

Description:Given two lists of closed intervals, each list of intervals is pairwise disjoint and in sorted order.Return the intersection of these two interval lists.(Formally, a closed interval [a, b] (with a <= b) denotes the set of real numbers x w

2020-05-12 17:16:27 165

原创 78. Subsets

Description:Given a set of distinct integers, nums, return all possible subsets (the power set).Note: The solution set must not contain duplicate subsets.Analysis:解法1:分治思想,复杂问题化成简单的子问题,子集i是子集i-1,然后加上nums[i]构成的集合。全排列、全组合、子集可以归纳为一类问题。Solution1:时间复杂度O

2020-05-08 23:27:51 106

原创 236. Lowest Common Ancestor of a Binary Tree

Description:Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.Analysis:第一种:很直接的解法公共祖先,所以从根到结点的path前面部分相同,有些类似两个链表的公共结点,先求出root到结点的path,然后比较即可。第二种:参考很巧妙的解法...

2020-05-08 15:46:03 163

原创 145. Binary Tree Postorder Traversal

Description:Given a binary tree, return the postorder traversal of its nodes’ values.Analysis:递归解法容易,如果是非递归呢?很好解法:二叉树非递归解法决定这个解法的原因是二叉树的结构和依次访问二叉树的顺序,根-左-左-根-右-右-根。Solution1:两个辅助栈,输出栈是后序遍历的逆序,辅...

2020-05-08 11:26:10 122

原创 中心化副本

数据多个副本:选择中心化还是去中心化?中心化副本控制:副本有primary和secondary去中心化副本控制:所有副本地位相等问题1:主从节点更新1.主从节点之间数据的同步是同步模式还是异步模式?2.数据的流向?元数据和数据如何在主从之间写入3.部分节点写入失败了怎么办?问题2:主从节点数据读取1.secondary节点是否支持读取?2.如果secondary节点支持读取,是...

2020-05-07 21:02:36 150

AWK程序设计语言翻译

师弟翻译的: 《AWK程序设计语言》 -Alfred V.Aho Brian W.Kernighan Peter J.Weinberger github地址:https://github.com/wuzhouhui/awk 仅供学习,欢迎交流。

2015-12-21

数字图像处理标准测试图

以前下载了一些,又找了一些,要删除了,所有传了,希望能有点用处

2013-06-20

opencv1.0安装程序

第一个opencv1.0版本,有问题请安装第二个。这个是所有版本下载网址http://www.opencv.org.cn/index.php/Download#Version_1.0_rc1_.280.9.9.29

2013-06-10

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除