自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

LX

潜下心好好学习

  • 博客(267)
  • 收藏
  • 关注

原创 Spark学习笔记

本文整理自《Spark快速大数据分析》,其中SparkSQL和SparkStreaming还没学习,日后补上第二章 Spark入门RDD(弹性分布式数据集)是Spark对分布式数据和计算的基本抽象。每个Spark应用都有一个驱动器程序来发起集群上的并行操作。驱动器程序包含应用的main函数,并且定义了集群上的分布式数据集,还对数据集应用了相关操作。驱动器程序一般要管理多个执行器

2016-08-26 14:33:05 4314

原创 关于深度学习的一些整理

深度学习入门:http://blog.csdn.net/zouxy09/article/category/1387932CNN:CNN常用模型:http://blog.csdn.net/abcjennifer/article/details/42493493 (ALEXNET、LENET、VGG、GOOGLENET)residual net:http://blog.csdn.n

2016-06-08 17:47:11 1158

原创 常用排序算法总结

1.插入排序每一步都将一个待排数据按其大小插入到已经排序的数据中的适当位置,直到全部插入完毕。2.希尔排序基本思想是:先将整个待排元素序列分割成若干个子序列(由相隔某个“增量”的元素组成的)分别进行(直接插入,冒泡)排序,然后依次缩减增量再进行排序,待整个序列中的元素基本有序(增量足够小)时,再对全体元素进行一次排序。3.冒泡排序相邻两个数比较,依次交换

2016-03-15 22:45:09 513

转载 Windows 命令行下解决python utf-8中文输出的终极解决方案!

代码参考了这里:http://wiki.python.org/moin/PrintFails上文对各种系统无法输出奇葩编码的字符做了总结,本文中只针对windows cmd下GBK编码(cp936)但想执行utf-8编码的python文件进行修改。原理就是:Another is to put an intercept between sys.stdout, an

2016-01-24 20:34:03 5511 2

转载 Leetcode243: Find Median from Data Stream

Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value.Examples: [2,3,4] , the median

2016-01-24 16:27:18 447

转载 Leetcode242: Shortest Palindrome

Given a string S, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can find by performing this transformation.For exam

2016-01-24 14:15:13 378

转载 Leetcode241: Valid Number

Validate if a given string is numeric.Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intended for the problem statement to be ambiguo

2016-01-22 21:13:39 485

转载 Leetcode240: Word Break II

Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all such possible sentences.For example, givens = "

2016-01-15 21:26:56 396

原创 Leetcode239: Dungeon Game

The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was initially p

2016-01-15 20:58:49 338

转载 Leetcode238: Substring with Concatenation of All Words

You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in wordsexactly once and w

2016-01-15 10:42:17 321

转载 Leetcode237: Palindrome Partitioning II

Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s.For example, given s = "aab",Retu

2016-01-15 09:39:46 419

转载 Leetcode236: Interleaving String

Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:s1 = "aabcc",s2 = "dbbca",When s3 = "aadbbcbcac", return true.When s3 = "aadbbbaccc", r

2016-01-14 21:49:18 347

转载 Leetcode235: Longest Valid Parentheses

Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid parentheses substring is "()",

2016-01-14 21:14:48 333

转载 Leetcode234: Recover Binary Search Tree

Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is pretty straight forward. Could you devis

2016-01-14 20:58:03 417

转载 Leetcode233: Scramble String

Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation of s1 = "great": great / \ gr

2016-01-14 17:37:13 398

转载 Leetcode232: Copy List with Random Pointer

A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the list.网上看到一个O(n)的算法,非常巧妙的利用了原来链表

2016-01-14 17:11:44 397

转载 Leetcode231: Minimum Window Substring

Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S = "ADOBECODEBANC"T = "ABC"Minimum window is "BAN

2016-01-13 22:27:47 336

原创 Leetcode230: Power of Three

Given an integer, write a function to determine if it is a power of three.Follow up:Could you do it without using any loop / recursion?解法一:class Solution {public: bool isPowerOfThree(

2016-01-13 21:54:25 454

原创 Leetcode229: Max Points on a Line

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.以每个点为源点,计算所有点与该点的斜率,用哈希表存储同一斜率的点数,找出对于这个点最大共线的点数,再找出所有点中最大的点数即可。/** * Definition for a point.

2016-01-13 21:30:06 381

转载 Leetcode228: Regular Expression Matching

Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the entire input st

2016-01-13 11:29:04 358

转载 Leetcode227: Best Time to Buy and Sell Stock IV

Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete at most k transactions.Note:You may

2016-01-12 22:30:01 319

原创 Leetcode226: Merge k Sorted Lists

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.可以借鉴Merge two sorted lists的方法,在他的基础上用分治算法。/** * Definition for singly-linked list. * struct Li

2016-01-12 22:08:04 264

转载 Leetcode225: Candy

There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at least on

2016-01-08 20:56:55 410

转载 Leetcode224: Sudoku Solver

Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will be only one unique solution.A sudoku

2016-01-08 20:38:18 301

转载 OpenCV函数cvFindContours轮廓提取

提取轮廓在OpenCV里有一个函数 cvFindContours :[cpp] view plaincopyint cvFindContours( CvArr* image, CvMemStorage* storage, CvSeq** first_contour,int header_size=sizeof(CvContour),int mode=CV_RETR_LIST,int method=

2016-01-08 15:18:45 2910

原创 Leetcode223: Insert Interval

Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to their start times.E

2016-01-08 11:20:29 353

转载 Leetcode222: Jump Game II

Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Your goal i

2016-01-08 10:25:47 398

转载 Leetcode221: Sliding Window Maximum

Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window

2016-01-08 09:46:31 377

原创 Leetcode220: First Missing Positive

Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should run in O(n) time and uses constant

2016-01-07 16:44:35 292

转载 Leetcode219: Merge Intervals

Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18]./** * Definition for an interval. * struct Interva

2016-01-07 15:48:20 261

原创 Leetcode218: Maximum Gap

Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 if the array contains less than 2 elements

2016-01-07 15:22:35 429

转载 Leetcode217: Reverse Nodes in k-Group

Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is

2016-01-07 14:58:54 275

转载 Leetcode216: Edit Distance

Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted on a word:

2016-01-07 11:11:28 273

转载 Leetcode215: Distinct Subsequences

Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from the original string by deleting some (can be non

2016-01-05 14:08:18 243

转载 Leetcode214: Remove Invalid Parentheses

Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results.Note: The input string may contain letters other than the parentheses ( and ).

2016-01-04 21:07:31 261

转载 Leetcode213: Longest Consecutive Sequence

Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest consecutive elements sequence is [1, 2, 3

2016-01-04 17:15:44 309

转载 Leetcode212: Burst Balloons

Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you burst balloon i you will get num

2016-01-04 15:58:02 378

转载 Leetcode211: Populating Next Right Pointers in Each Node II

Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution still work?Note:You may only use constant

2016-01-04 11:29:48 277

原创 Leetcode210: Find Minimum in Rotated Sorted Array II

Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Suppose a sorted array is rotated at some pivot unk

2016-01-03 19:56:50 299

转载 图像的基本几何变换

文章出处:http://www.cnblogs.com/wangguchangqing/p/4039095.htmlhttp://www.cnblogs.com/wangguchangqing/p/4045150.html

2015-12-28 15:19:41 430

空空如也

空空如也

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

TA关注的人

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