自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

LandscapeMi

landscapemi的博客

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

原创 spark配置:spark集群

http://www.cnblogs.com/onetwo/p/5424377.html1. 软件版本scala-2.11.8.tgzspark-1.6.1-bin-hadoop2.6.tgz2. scala安装2.1 0master机器安装下载 scala-2.11.8.tgz, 解压到 /usr/scala 目录下,即: /usr/scala/scala-2.11.8。解压:tar -zx

2016-12-22 00:45:48 773

原创 spark 配置:yarn集群

http://www.cnblogs.com/onetwo/p/5424377.html1. 规划1.1 硬件华白:master+slave3: master: 192.168.1.101slave3:192.168.1.203华台:slave1+slave2 192.168.1.201192.168.1.2021.2 软件版本VMware-Fusi

2016-12-19 17:23:02 702

原创 NLP:nltk+stanfordNLP

1. NLTKimport nltkform nltk.book import *2. NLTK中使用stanfordNLPhttp://www.zmonster.me/2016/06/08/use-stanford-nlp-package-in-nltk.html https://github.com/nltk/nltk/wiki/Installing-Third-Party-Softwar

2016-10-19 11:16:02 719

原创 NLP:stanfordNLP

http://www.zmonster.me/2016/06/08/use-stanford-nlp-package-in-nltk.htmlhttp://stanfordnlp.github.io/CoreNLP/http://blog.csdn.net/ltbylc/article/details/85579651. stanfordNLP分词: StanfordTokenizer词性标注:

2016-10-03 08:17:46 3781 4

原创 NLP:实体识别

实体识别算法1.1 有监督的算法HMM最大熵svmcrf决策树1.2 半监督的算法自举学习1.3 无监督的算法词汇聚类1.4 混合方法2 分类2.1 crf的算法2.2

2016-10-01 11:49:23 2484

原创 NLP:词性标准

1. 基于统计模型的词性标准1.1 HMM1.2 CRF2. 基于规则的词性标准

2016-10-01 11:41:00 1349

原创 NLP:中文分词

结巴分词:https://github.com/fxsjy/jieba斯坦福分词:http://www.zmonster.me/2016/06/08/use-stanford-nlp-package-in-nltk.htmlhttp://acepor.github.io/2015/12/22/Stanford-Cn/分词算法1. 查找字典算法基于字典匹配1.1 词的查找方法Trie树三

2016-09-30 14:27:55 642

原创 NLP:总结

1. 分词结巴分词:https://github.com/fxsjy/jieba斯坦福分词:http://www.zmonster.me/2016/06/08/use-stanford-nlp-package-in-nltk.htmlhttp://acepor.github.io/2015/12/22/Stanford-Cn/2. 词性标准3. 实体识别4. 句子分析5. 文法分析6. 文本

2016-09-30 00:02:35 552

原创 leetcode-总结:array

数字和问题2-twosum-两数和15-3sum16-3sumClose18-4sum167-twosum2-两数和查找数组4-Median-of-two-sorted-arrays-中位数33-search in rotated sorted arrat-查找有序数组41-first missing positive-丢失的数153-Find Minimum in Rotate

2016-09-24 16:17:04 448

原创 leetcode:heap:Find K Pairs with Smallest Sums(373)

https://leetcode.com/problems/find-k-pairs-with-smallest-sums/http://blog.csdn.net/qq508618087/article/details/51864835class Solution { public: vector<pair<int, int>> kSmallestPairs(vector<int>

2016-09-01 15:29:31 505

原创 leetcode:heap:Sliding Window Maximum(239)

https://leetcode.com/problems/sliding-window-maximum/class Solution {public: vector<int> maxSlidingWindow(vector<int>& nums, int k) { vector<int> res; deque<int> q; for (in

2016-09-01 15:26:36 376

原创 leetcode:greedy:Wiggle Subsequence(376)

https://leetcode.com/problems/wiggle-subsequence/http://blog.csdn.net/qq508618087/article/details/51991068class Solution { public: int wiggleMaxLength(vector<int>& nums) { if(nums.siz

2016-09-01 15:18:35 436

原创 leetcode:greedy: Patching Array(330)

https://leetcode.com/problems/patching-array/http://blog.csdn.net/u012717411/article/details/50609582class Solution { public: int minPatches(vector<int>& nums, int n) { long long cur =

2016-09-01 15:15:50 522

原创 leetcode:greedy: Create Maximum Number(321)

https://leetcode.com/problems/create-maximum-number/http://www.cnblogs.com/grandyang/p/5136749.htmlclass Solution {public: vector<int> maxNumber(vector<int>& nums1, vector<int>& nums2, int k) {

2016-09-01 15:14:29 473

原创 leetcode:greedy: Candy(135)

https://leetcode.com/problems/candy/http://www.cnblogs.com/x1957/p/3371601.htmlclass Solution {public: int candy(vector<int> &ratings) { vector<int> candy(ratings.size(), 1); int

2016-09-01 15:13:11 384

原创 leetcode:greedy:Gas Station(134)

There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its nex

2016-09-01 15:11:44 453

原创 leetcode:sort:Wiggle Sort II(324)

Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3]….Example: (1) Given nums = [1, 5, 1, 1, 6, 4], one possible answer is [1, 4, 1, 5, 1, 6]. (2) Given nums = [1

2016-09-01 15:09:19 457

原创 leetcode:sort:Largest Number(179)

Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.Note: The result may be very large,

2016-09-01 15:07:50 426

原创 leetcode:sort:Maximum Gap(164)

https://leetcode.com/problems/maximum-gap/http://www.cnblogs.com/ganganloveu/p/4162290.htmlclass Solution {public: int maximumGap(vector<int>& nums) { if(nums.empty() || nums.size() == 1)

2016-09-01 15:06:14 454

原创 leetcode:sort:Maximum Gap(164)

https://leetcode.com/problems/maximum-gap/http://www.cnblogs.com/ganganloveu/p/4162290.htmlclass Solution {public: int maximumGap(vector<int>& nums) { if(nums.empty() || nums.size() == 1)

2016-09-01 15:04:44 395

原创 leetcode:bits:Find the Difference(389)

https://leetcode.com/problems/find-the-difference/http://www.cnblogs.com/qinduanyinghua/p/5827777.htmlclass Solution {public: char findTheDifference(string s, string t) { int a[26] = {0}, l

2016-09-01 15:02:16 364

原创 leetcode:bits:Sum of Two Integers(371)

Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example: Given a = 1 and b = 2, return 3.http://blog.csdn.net/qq508618087/article/details/51789576class S

2016-09-01 15:00:29 329

原创 leetcode:bits:Power of Four(342)

Given an integer (signed 32 bits), write a function to check whether it is a power of 4.Example: Given num = 16, return true. Given num = 5, return false.Follow up: Could you solve it without loops/re

2016-09-01 14:51:16 321

原创 leetcode:bits:Counting Bits(338)

Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an array.Example: For num = 5 you sh

2016-09-01 14:49:43 322

原创 leetcode:bits:Maximum Product of Word Lengths(318)

https://leetcode.com/problems/maximum-product-of-word-lengths/http://blog.csdn.net/jeason29/article/details/50352667class Solution { public: int maxProduct(vector<string>& words) { in

2016-09-01 14:48:14 225

原创 leetcode:bits:Single Number III(260)

Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once.For example:Given nums = [1,

2016-09-01 14:45:51 200

原创 leetcode:bits:Bitwise AND of Numbers Range(201)

Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive.For example, given the range [5, 7], you should return 4.http://www.cnblogs.com/gran

2016-09-01 14:43:26 195

原创 leetcode:bits:Number of 1 Bits(191)

https://leetcode.com/problems/number-of-1-bits/class Solution { public: int hammingWeight(uint32_t n) { int count = 0; while (n) { if (n % 2 == 1) {

2016-09-01 14:40:35 160

原创 leetcode:Bit Manipulation: Reverse Bits(190)

Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 00111001011110

2016-08-31 15:26:57 195

原创 leetcode:Bit Manipulation:Single Number II(137)

Given an array of integers, every element appears three times except for one. Find that single one.class Solution { public: int singleNumber(vector<int>& nums) { int length = nums.siz

2016-08-31 15:25:41 198

原创 leetcode:bfs: Remove Invalid Parentheses(301)

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 ).Examp

2016-08-31 15:22:07 212

原创 leetcode: Number of Islands(200)

https://leetcode.com/problems/number-of-islands/class Solution {public: bool dfs(int i,int j,vector<vector<char>> &grid) { if(i>=0&&i<grid.size()&&j>=0&&j<grid[i].size()&&grid[i][j]=='1

2016-08-31 15:19:11 195

原创 leetcode:Union Find:Surrounded Regions(130)

class Solution { public: void process(int i,int j,vector<vector<char> >& board) { int m=board.size(); int n=board[0].size(); typedef pair<int,int> point;

2016-08-31 15:16:21 251

原创 leetcode:Trie:Word Search II(212)

https://leetcode.com/problems/word-search-ii/struct TrieNode{ bool isEnd; TrieNode *children[26]; TrieNode() : isEnd(false) { for (int i = 0; i < 26; i++) {

2016-08-31 15:05:09 301

原创 leetcode:Trie:Add and Search Word - Data structure design(211)

https://leetcode.com/problems/add-and-search-word-data-structure-design/class TrieNode { public: bool isEnd; TrieNode *children[26]; TrieNode() : isEnd(false) { fo

2016-08-31 15:03:01 213

原创 leetcode:Trie:Implement Trie (Prefix Tree)(208)

Implement a trie with insert, search, and startsWith methods.class TrieNode { public: char var; bool isWord; TrieNode* children[26]; // Initialize your data structure here.

2016-08-31 15:01:46 176

原创 leetcode: Segment Tree:Range Sum Query - Mutable(307)

https://leetcode.com/problems/range-sum-query-mutable/class NumArray {public: NumArray(vector<int> &nums) { num.resize(nums.size() + 1); bit.resize(nums.size() + 1); for (i

2016-08-31 14:58:12 234

原创 leetcode:Data Stream as Disjoint Intervals(352)

https://leetcode.com/problems/data-stream-as-disjoint-intervals/class SummaryRanges { public: /** Initialize your data structure here. */ void addNum(int val) { auto it = st.low

2016-08-31 14:56:04 239

原创 leetcode:Binary Search Tree:Contains Duplicate III(220)

Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j] is at most t and the difference between i and j is

2016-08-31 14:54:34 191

原创 leetcode:Brainteaser: Nim Game(292)

You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the

2016-08-31 14:50:39 185

空空如也

空空如也

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

TA关注的人

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