自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(624)
  • 资源 (2)
  • 收藏
  • 关注

转载 CENTOS7安装VIM插件YOUCOMPLETEME

来自: Dreamlike博客,本文链接: CentOS7安装Vim插件YouCompleteMeYouCompleteMe这个Vim插件还真不好安装,挺多坑的,折腾了挺久终于最后用上了。测试环境:[broly@localhost ~]$ cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core)一、更新Vim我安装这个插件的时候,提示

2018-01-22 16:34:48 7823 1

转载 leetcode -- Two Sum II - Input array is sorted

https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/description/http://blog.csdn.net/coder_orz/article/details/52388066

2017-11-14 23:15:46 676

原创 notes for setting up my new homepage

go daddyhttp://blog.csdn.net/xyqzki/article/details/22808961?locationNum=1digital oceanhttps://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04https://www.digitalocean.co

2016-09-28 23:37:43 1167

原创 call back回调函数理解

回调函数对应着request 以及response。例如一个spider会首先生成一个request对象,然后将request对象传给下载器,并且为request对象指定一个回调函数,i.e. 即 call back function。其中有个参数肯定就是response, 用来处理请求之后的response.

2016-07-03 20:54:16 1669

原创 mac osx 安装mysql步骤

step1brew install mysqlstep2enter mysql, 会遇到ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)因为没有开启mysql服务。step3开启mysql 服务mysql.server start关闭mysql 服务mysql.se

2016-07-03 16:40:24 1003

原创 crawl facebook public group page notes

how to extract a web element?how to use document.querySelectAllhow to click that element? 注意使用延迟。 until visible.. use that function 还要注意visible,整个浏览器的view窗口中如果没有你想click的element,那么就会not clickable. 所

2016-07-03 16:37:47 633

原创 eclipse c++如果debug的时候,遇到no source for main

这个原因就是没有在makefile里面加上debug的symbols.参考http://stackoverflow.com/questions/1079832/how-can-i-configure-my-makefile-for-debug-and-release-builds做一个make debug

2016-03-28 11:42:36 4000

原创 eclipse c++ 遇到error while loading .....某某lib的问题

在project->property里面加上include Path还不够。要在run->environment里面加上LD_LIBRARY_PATH这个变量,然后把变量值给定。参考:https://www.eclipse.org/forums/index.php/t/59955/

2016-03-28 11:41:21 720

转载 c++ 用new动态申请数组初始化的问题

ref : http://www.cnblogs.com/mywebname/articles/2291540.html注意括号的使用注意:C++使用new和delete在堆(自由存储区)上分配和释放动态数组。动态数组初始化:1.元素只能初始化为元素类型的默认值,而不能像数组变量一样,用初始化列表为数组元素提供各不相同的初值。2.对于内置数据类型元素的数组,必须使用()来显示指定程序执行初始化操作,

2016-03-21 16:46:20 18457 3

原创 Codility K complementary pairs

codelity kcomplementary pairs A non-empty zero-indexed array A consisting of N integers is given. A pair of integers (P, Q) is called K-complementary in array A if 0 ≤ P,

2016-03-20 16:04:37 2715

原创 leetcode总结-- 排序算法(内部排序)

包括quick_sort(不稳定), merge_sort(稳定), bubble_sort(稳定), selection_sort(不稳定), insertion_sort(稳定)code整理如下,我们可以发现所有的O(n2n^2)方法,都是for i in xrange(len(nums) - 1):说明它们都要进行len(nums) - 1次循环,例如bubble_sort要冒泡len(num

2016-01-18 15:36:29 1318

原创 leetcode总结 -- 关于merget k sorted list问题。heap

Merge k Sorted Lists http://blog.csdn.net/xyqzki/article/details/50265013super ugly number http://blog.csdn.net/xyqzki/article/details/50379007

2016-01-17 22:39:51 881

原创 leetcode总结 -- 对于一个给定的matrix,每个元素是0 or 1

Game of Life bit manipulation http://blog.csdn.net/xyqzki/article/details/50254081Maximal Square dp http://blog.csdn.net/xyqzki/article/details/50252829Maximal Rectangle increasing stack http://b

2016-01-17 21:29:40 798

原创 leetcode总结 -- 关于tree path的题目

path sum http://blog.csdn.net/xyqzki/article/details/50206683path sum II http://blog.csdn.net/xyqzki/article/details/50207855binary tree path http://blog.csdn.net/xyqzki/article/details/50208535Lowe

2016-01-17 17:26:29 575

原创 single number 系列 参考

位操作总结http://blog.csdn.net/morewindows/article/details/7354571single number 题目http://blog.csdn.net/MoreWindows/article/details/12684497 http://blog.csdn.net/MoreWindows/article/details/8214003

2016-01-16 16:21:06 523

原创 leetcode总结-- heapq运用,关于super ugly number, merge k sorted list

相关题目merge k sorted list http://blog.csdn.net/xyqzki/article/details/50265013super ugly number http://blog.csdn.net/xyqzki/article/details/50379007heapq这里关于heapq的运用,对于list a,我们可以in-place, 将其transform

2016-01-14 12:16:42 1063

原创 leetcode -- Range Sum Query - Mutable -- 重点,有线段树

https://leetcode.com/problems/range-sum-query-mutable/线段树的典型题目,参考http://bookshadow.com/weblog/2015/08/13/segment-tree-set-1-sum-of-given-range/ http://bookshadow.com/weblog/2015/11/18/leetcode-range-s

2016-01-14 10:35:09 2300

原创 leetcode总结 -- 收缩window

leetcode – Minimum Size Subarray Sum – 重点 http://blog.csdn.net/xyqzki/article/details/50354111leetcode – Minimum Window Substring – 重点,应该会考 http://blog.csdn.net/xyqzki/article/details/50382435

2016-01-13 20:40:19 732

原创 leetcode总结4 -- 关于two pointers两个容易考的题目

Remove Elementhttp://blog.csdn.net/xyqzki/article/details/50154553用数组尾部的index来接收the given element. 这里不用保持relative orderMove Zeroshttp://blog.csdn.net/xyqzki/article/details/50154157可以看成上面题目的翻版,从数组头部开始接

2016-01-12 21:31:37 1008

原创 leetcode总结3 -- rotated array search

find min in rotated array http://blog.csdn.net/xyqzki/article/details/50248589search in rotated array http://blog.csdn.net/xyqzki/article/details/50321563

2016-01-12 16:24:19 466

原创 leetcode总结2 -- 找一个特殊的数

single number http://blog.csdn.net/xyqzki/article/details/50310895first missing positive number http://blog.csdn.net/xyqzki/article/details/50381994find the duplicate the number 抽屉原理那一题http://blog.cs

2016-01-12 09:52:04 515

原创 leetcode中word 系列总结 -- 先记下来,回头再写

word breakword ladderword search

2016-01-11 12:32:34 570

原创 leetcode -- Recover Binary Search Tree -- 重点

https://leetcode.com/problems/recover-binary-search-tree/这里有两种思路思路1就是inorder遍历,把value 和 node都分别用list记录下来,然后将value的list重新排序,然后赋值给node 的list 但是这里 空间复杂度为O(n), 不符合题目要求思路2还是inorder遍历,但是这个时候用指针记录不符合BST的node

2016-01-08 21:06:51 663

原创 leetcode -- Word Search II -- 难理解,再看看

https://leetcode.com/problems/word-search-ii/最直观的思路就是对于每个word,都对board进行一次dfs搜索。这样在words太多的情况下会TLE. 这里考虑到board上有些point,对于任意word或者任意word的后缀都没有再继续搜索的必要,所以这里采用trie字典树存储所有带搜索的word。这样就只用dfs board一遍,就可以把所有的在b

2016-01-08 16:08:48 779

原创 leetcode -- Best Time to Buy and Sell Stock IV --难点要看

https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/参考: http://bookshadow.com/weblog/2015/02/18/leetcode-best-time-to-buy-and-sell-stock-iv/ http://www.cnblogs.com/maples7/p/4350047.html

2015-12-28 18:34:36 517

原创 leetcode -- Burst Balloons -- 重点dp

https://leetcode.com/problems/burst-balloons/类似于矩阵连乘的问题,但与house robber问题不一样。这里是2D dp,决策变量是在那个位置burst,类似于划分问题。这里dp是 bottom to up 思想。 参考:http://bookshadow.com/weblog/2015/11/30/leetcode-burst-balloons/

2015-12-28 12:50:27 4804

原创 leetcode -- Create Maximum Number -- 重点,新题

https://leetcode.com/problems/create-maximum-number/思路有点像merge sort.参考https://leetcode.com/discuss/75772/share-my-python-solution-with-explanationSo there’re 3 steps:iterate i from 0 to k.find max nu

2015-12-25 21:01:04 3987

原创 leetcode -- Count of Smaller Numbers After Self -- 经典求逆序数

https://leetcode.com/problems/count-of-smaller-numbers-after-self/思路1 merge sort关于merge sort归并排序的时候,会先一直递归到只剩下两个元素,然后对这两个元素进行merge,merge到一个临时数组。在合并的过程中就肯定有元素之间的交换,只不过这里的不是在原来数组上in place交换,而是说直接赋值到一个临时数

2015-12-25 19:46:16 9921

原创 leetcode -- Remove Invalid Parentheses--又是DFS,BFS的题目

https://leetcode.com/problems/remove-invalid-parentheses/valid parentheses definition字符串中的左右括号数应该相同,而且每个右括号左边一定有其对应的左括号思路1 DFS这里其实就是试着去remove其中一个左括号或者右括号,对于剩下的字符串,继续看remove哪一个左括号或者右括号,知道remove以及不能降低inv

2015-12-25 17:00:13 5039 2

原创 leetcode -- Range Sum Query 2D - Immutable -- 简单DP题目

https://leetcode.com/problems/range-sum-query-2d-immutable/简单DP就行。http://bookshadow.com/weblog/2015/11/12/leetcode-range-sum-query-2d-immutable/

2015-12-25 16:28:11 971 1

原创 leetcode -- 线段树理解

参考http://www.cnblogs.com/TenosDoIt/p/3453089.html http://dongxicheng.org/structure/segment-tree/ http://bookshadow.com/weblog/2015/08/13/segment-tree-set-1-sum-of-given-range/Note”对于包含n个叶子节点的完全二叉树,它

2015-12-25 12:45:03 1933

原创 leetcode -- Find Median from Data Stream -- 设计题重点

https://leetcode.com/problems/find-median-from-data-stream/利用minHeap以及maxHeap。把一个ordered num list, 分成两半A1 A2,或者其中一半比另一半长度多1,那么A1可以维护一个maxHeap,顶部就是最大值,即最靠近中间的值;A2可以维护一个minHeap,顶部就是最小值,也就是最靠近中间的值。参考http:

2015-12-25 10:58:32 631

原创 leetcode -- The Skyline Problem -- 难理解,关于heap

https://leetcode.com/problems/the-skyline-problem/基本没理解,再看看思路1 divide and conquerhttp://www.geeksforgeeks.org/divide-and-conquer-set-7-the-skyline-problem/ code参考 http://blog.csdn.net/pointbreak1/art

2015-12-24 23:28:44 1073

原创 leetcode -- Contains Duplicate III -- 重点,medium题目

https://leetcode.com/problems/contains-duplicate-iii/思路1 sorting参考http://yucoding.blogspot.hk/2015/10/leetcode-question-contains-duplicate-iii.html思路2 sliding windows参考http://bookshadow.com/weblog/2015

2015-12-24 23:16:55 473

原创 leetcode -- Course Schedule I && II -- TopSort重点

https://leetcode.com/problems/course-schedule/关于graph的题目,考察拓扑排序Course Schedule这里只要判断是否能拓扑排序就行,就是看graph内有没有环,是不是DAG。拓扑排序 参考http://blog.csdn.net/dm_vincent/article/details/7714519,思路1 Kahn算法http://songle

2015-12-24 20:43:34 695

原创 leetcode -- Dungeon Game -- dp重点,典型题

https://leetcode.com/problems/dungeon-game/dp典型题目。table filling 问题, 跟这些一起看https://leetcode.com/problems/unique-paths/ https://leetcode.com/problems/minimum-path-sum/这里dp[i][j] 要从dp[len(n)][len(m)]开始递

2015-12-24 19:37:51 492

原创 leetcode -- Add and Search Word - Data structure design -- 重点

https://leetcode.com/problems/add-and-search-word-data-structure-design/同样是关于trie.只是在search的时候要dfs backtracking 参考http://yucoding.blogspot.hk/2015/07/leetcode-question-add-and-search-word.htmlclass Tr

2015-12-24 17:34:11 503

原创 leetcode -- Implement Trie (Prefix Tree) -- 关于字典树,重要

https://leetcode.com/problems/implement-trie-prefix-tree/关于字典树介绍http://www.cnblogs.com/tanky_woo/archive/2010/09/24/1833717.html方便word的插入,搜索。看code就知道思路了。参考http://yucoding.blogspot.hk/2015/06/leetcode-q

2015-12-24 16:58:32 623

原创 leetcode -- Fraction to Recurring Decimal -- 数学题,知道相除规则

https://leetcode.com/problems/fraction-to-recurring-decimal/参考 http://yucoding.blogspot.hk/2015/03/leetcode-question-fraction-to-recurring.html 的计算方法。思路见codeclass Solution: # @return a string

2015-12-24 14:00:55 602

原创 leetcode -- Maximum Gap -- 与distributed sorting有关,重点复习一下

https://leetcode.com/problems/maximum-gap/sort 算法除了比较算法之外,还有distributed sort,时间效率可以优于O(nlogn),甚至可以达到O(n).包括couting sort, bucket sort, radix sort.复习这三种的原理。 参考https://www.byvoid.com/blog/sort-radix这里对于b

2015-12-24 12:22:25 490

基于风险决策的企业管理分析

2010年西北工业大学数学建模校队暑假训练题----2010年东北A题

2010-07-22

温室中的绿色生态臭氧病虫害防治

2010年西北工业大学数模校队训练题----第七届苏北B题

2010-07-18

空空如也

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

TA关注的人

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