三分地

单纯明快。
私信 关注
sanfendi
码龄9年
  • 799,283
    被访问量
  • 200
    原创文章
  • 6,831
    作者排名
  • 255
    粉丝数量
  • 目前就职 亚信科技(中国)有限公司
  • 于 2012-06-17 加入CSDN
获得成就
  • 获得31次点赞
  • 内容获得33次评论
  • 获得109次收藏
荣誉勋章
TA的专栏
  • hadoop技术
    11篇
  • java
    21篇
  • nlp
    4篇
  • 信息论
    1篇
  • 项目
    2篇
  • 数据库
    2篇
  • 杂谈
    5篇
  • linux
    1篇
  • 数据结构
    11篇
  • 机器学习
    14篇
  • lucene
    1篇
  • 算法
    5篇
  • hadoop
    14篇
  • hadoop-2.2.0中文文档
    16篇
  • 翻译
    8篇
  • hbase
    2篇
  • leetcode
    119篇
  • 计算广告
    2篇
  • spark
    5篇
  • hive
    3篇
  • Python
    3篇
  • 统计学
    1篇
  • 最近
  • 文章
  • 资源
  • 问答
  • 课程
  • 帖子
  • 收藏
  • 关注/订阅

ADSL命令定时切换

使用 scapy 爬取数据时,经常遇到 IP 被限制,在一些 VPS 上使用 adsl 重连可以达到切换 IP 的目的。 在 windows 上可以使用以下命令连接或断开 adsl。rasdial ADSL user_name password #连接rasdial ADLS /d #断开为了方便,使用以下 python 脚本定时控制:#coding:utf-8import osimport
原创
0评论
1点赞
发布博客于 4 年前

outlook html 邮件表格边框问题

工作中需要定时自动发送一个邮件报表,使用 HTML、CSS 编写正文。为了减少代码量,在外部 style 中定义如下:td {border:1px solid;}这种写法在 foxmail 上显示的邮件是正常的,但在 outlook 上邮件显示没有边框,于是在每一个 td 加上 border 属性,发现边框分别出现,即每两格之间的边框都出现,非常难看。按照如下编写则会正常显示: table 有一个
原创
0评论
1点赞
发布博客于 4 年前

备份MySQL大表的数据

需求:有一个数据库,其中一些表每天写入百万条。现要求将某段时间的表数据保存到本地。最开始使用fetchall(),导致服务器直接宕机。如果使用mysqldump命令,会锁表,导致不能写入数据。后来发现python 的MySQLdb提供了fetchmany()的函数,可以控制每次获取的行数。以下的代码可以根据where条件读取数据库,而不给服务器造成很大压力。# coding=utf-8# crea
原创
0评论
1点赞
发布博客于 5 年前

wget命令从kaggle.com下载文件

kaggle.com上的数据集有时候会比较大 ,而且没有提供网盘下载机制,国内下载速度非常慢,同时下载需要验证,也无法使用迅雷工具下载。kaggle论坛上看到有wget的下载方式介绍[1]: 做法是先登录kaggle.com,记下浏览器中的cookie,将cookie保存到cookies.txt中,执行如下命令:wget -x --load-cookies cookies.txt -P
原创
0评论
0点赞
发布博客于 6 年前

使用Spark SQL 探索“全国失信人数据”

“全国法院失信被执行人名单”,网址:http://shixin.court.gov.cn/,可供查询,用于惩罚失信人员。数据量有100多万,也算是大数据了。其中身份证号已被处理,并不能直接看到全部号码。本人承诺不将此数据用于非法用途和不正当用途,仅作为个人学习数据处理分析的数据源,不针对任何个人和组织。数据字段如下: 被执行人姓名/名称 性别 年龄 身份证号码/组织机构代码
原创
0评论
2点赞
发布博客于 6 年前

使用Spark和Zeppelin探索movie-lens数据

MovieLens 100k数据包含有100,000条用户与电影的相关数据。 首先下载并解压数据:wget http://files.grouplens.org/datasets/movielens/ml-100k.zipunzip ml-100k.zipcd ml-100k#用户文件(ID,年龄,性别,职业,邮编)zhf@ubuntu:~/Downloads/ml-100k$ head
原创
2评论
2点赞
发布博客于 6 年前

Apache Zeppelin简介

Zeppelin是一个Apache的孵化项目,一个多用途笔记本。(类似于ipython notebook,可以直接在浏览器中写代码、笔记并共享) 可实现你所需要的: - 数据采集 - 数据发现 - 数据分析 - 数据可视化和协作支持多种语言,默认是scala(背后是spark shell),SparkSQL, Markdown 和 Shell。 甚至可以添加自己的语言支持。如何写一个
翻译
0评论
2点赞
发布博客于 6 年前

SQL注入

通过成功地SQL注入,可能可以拿到目标数据库的全部信息!首先要找到目标网址,以进行漏洞测试。在google中搜索:inurl:news.php?id=2任意点入一个网址:在网址后追加SQL语句,如果报错,则OK,可注入,如果未报错,无可注入漏洞或未找到。 比如,找到一个网址:http://www.calidus.ro/en/news.php?id=2将此链接变成如下,去访问
原创
0评论
1点赞
发布博客于 6 年前

简单的商品信息爬虫——爬易迅网

收集到很多易迅网的商品ID,于是想把这些ID对应的商品信息爬下来。通过简单分析发现,易迅网的各类信息都是直接放在HTML页面上,所以,解析一个页面就好了。最后返回每个ID对应的商品url,标题,易迅价,促销价,类目 。下面是python代码:#!/usr/bin/env python#coding:utf-8'''Created on 2015年03月11日@author: z
原创
0评论
0点赞
发布博客于 6 年前

1000万条用户名密码数据概览

一名安全研究员发布了一份包含1000万条记录的用户名、密码文件。原文可见:Today I Am Releasing Ten Million Passwords下载下来看看:确实是刚好有1000万条记录$ wc -l 10-million-combos.txt 10000000 10-million-combos.txt共有两列,分别是username、password$
原创
0评论
0点赞
发布博客于 6 年前

实时分析-分析和可视化流数据的技术

Real-Time Analytics: Techniques to Analyze and Visualize Streaming Data 实时分析-分析和可视化流数据的技术.pdf 包括Storm、samza、kafaka、flume等技术.
pdf
发布资源于 6 年前

spark官方文档中文版

本文翻译自Spark官方文档 spark官方文档中文版
pdf
发布资源于 6 年前

Spark开发指南

Spark开发指南.pdf 本书参考Spark官方文档和源码,通过本书你将精通Spark的安装、配置、开发、监控和调优。
pdf
发布资源于 6 年前

spark apache日志分析、流数据处理教程

Databricks Spark Reference Applications spar日志分析、流数据处理 java8代码
pdf
发布资源于 6 年前

Spark大数据处理:技术、应用与性能优化(全)

Spark大数据处理:技术、应用与性能优化(全).mobi 可在kindle和PC上看.
mobi
发布资源于 6 年前

Functional Design Patterns

Functional Design Patterns.pdf 函数式编程模式
pdf
发布资源于 6 年前

wireshark中文手册.pdf

wireshark中文手册.pdf
pdf
发布资源于 6 年前

使用Spark计算PV、UV

日志字段格式:id,ip,url,ref,cookie,time_stamp把日志文件放到HDFS。仅取了1000行。hadoop fs -put 1000_log hdfs://localhost:9000/user/root/input计算PV。scala> val textFile = sc.textFile("hdfs://localhost:9000/user/ro
原创
0评论
0点赞
发布博客于 6 年前

Python数据可视化手册.pdf

Python Data Visualization Cookbook.pdf
pdf
发布资源于 6 年前

Scala编程.pdf

Scala编程.pdf
pdf
发布资源于 6 年前

SQL语言艺术.pdf

SQL语言艺术.pdf
pdf
发布资源于 6 年前

高级MySQL性能优化

UC2005-Advanced-MySQL-Performance-Optimization 高级MySQL性能优化.pdf
pdf
发布资源于 6 年前

互联网精准广告定向技术-by牛国柱-20130707

互联网精准广告定向技术-by牛国柱-20130707
pdf
发布资源于 6 年前

用Python做科学计算 2010.pdf

用Python做科学计算 2010.pdf
pdf
发布资源于 6 年前

程序员的SQL金典.pdf

程序员的SQL金典.pdf
pdf
发布资源于 6 年前

数据仓库工具箱:维度建模的完全指南·第二版.pdf

数据仓库工具箱:维度建模的完全指南·第二版.pdf
pdf
发布资源于 6 年前

Kaggle竞赛题之——Sentiment Analysis on Movie Reviews

Classify the sentiment of sentences from the Rotten Tomatoes dataset题目链接:https://www.kaggle.com/c/sentiment-analysis-on-movie-reviews越来越喜欢iPython notebook了。以下所有工作都可以在一个页面上完成,FireFox支持比Chrome
原创
2评论
0点赞
发布博客于 6 年前

Kaggle竞赛题目之——Digit Recognizer

Classify handwritten digits using the famous MNIST dataThis competition is the first in a series of tutorial competitions designed to introduce people to Machine Learning.The goal in this comp
原创
1评论
0点赞
发布博客于 6 年前

User-Agent分析及其价值简析

User-Agent,用户代理。用户在上网访问的时候会作为HTTP的包头的一部分向服务器发送,用于识别用户的当前环境,如浏览器及版本号、操作系统等信息。在Chrome中可以在访问网站的时候按下F12查看。比如我在使用的Chrome的User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like G
原创
0评论
2点赞
发布博客于 7 年前

URL链接中的utm_source,utm_medium简析

工作中需要分析一些链接,统计分析一些信息。比如如下的链接:http://lightapplication.xxxx.com/?utm_source=ucweb&utm_medium=cpt&utm_term=zhilian&utm_content=textlink&utm_campaign=nov这个链接中带有一些参数,这些参数是什么意思呢,一直很好奇,现在需要用到这些信息了,对于网站主,
原创
3评论
6点赞
发布博客于 7 年前

Cassandra权威指南【中文版】.pdf

Cassandra权威指南【中文版】-1 (1).pdf
pdf
发布资源于 7 年前

快学Scala》完整版书籍.pdf

快学Scala》完整版书籍.pdf
pdf
发布资源于 7 年前

利用python进行数据分析(Python For Data Analysis.pdf)

利用Python进行数据分析,文字清晰完整,有目录,python数据分析必读。
pdf
发布资源于 7 年前

Kaggle竞赛题目之——Titanic: Machine Learning from Disaster

The sinking of the RMS Titanic is one of the most infamous shipwrecks in history.  On April 15, 1912, during her maiden voyage, the Titanic sank after colliding with an iceberg, killing 1502 out of 22
原创
4评论
0点赞
发布博客于 7 年前

Kaggle竞赛题目之——Predicting a Biological Response

Predict a biological response of molecules from their chemical properties从分子的化学属性中预测其生物反应。The objective of the competition is to help us build as good a model as possible so that we can, as op
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Subsets

Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.For exa
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Simplify Path

Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"click to show corner cases.Corner Cases:Did
原创
0评论
0点赞
发布博客于 7 年前

Minimum Path Sum

Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or right at
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Maximum Product Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the largest
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Maximum Product Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the largest
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Sqrt(x)

Implement int sqrt(int x).Compute and return the square root of x.原题链接:https://oj.leetcode.com/problems/sqrtx/使用二分法来解题。 public int sqrt(int x) { if(x == 0 || x== 1) return x; in
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Unique Paths II

Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively in the
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Unique Paths

A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach the
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Rotate List

Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL.原题链接:https://oj.leetcode.com/proble
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Permutation Sequence

The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):"123""132""213""231""3
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Spiral Matrix II

Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should return the following matrix:[ [ 1, 2, 3 ], [ 8, 9, 4 ], [
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Jump Game

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.Determine i
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Spiral Matrix

Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]]
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Pow(x, n)

Implement pow(x, n).原题链接:https://oj.leetcode.com/problems/powx-n/ public double pow(double x, int n) { if(n== 0) return 1; if(n == 1) return x; if(n % 2 ==0) return pow(x*x,n/2);
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Anagrams

Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.原题链接:https://oj.leetcode.com/problems/anagrams/易位构词游戏的英文词汇是 anagram,这个词来源于有
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Multiply Strings

Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-negative.原题链接:https://oj.leetcode.com/problems
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Combination Sum II

Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each number in C may only be used once in the combina
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Combination Sum

Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be chosen from C unlimited numb
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——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
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Count and Say

The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read off as "two 1s" or 21.21 is read off as 
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Valid Sudoku

Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character '.'.A partially fille
原创
0评论
0点赞
发布博客于 7 年前

Hive自定义函数的使用——useragent解析

想要从日志数据中分析一下操作系统、浏览器、版本使用情况,但是hive中的函数不能直接解析useragent,于是可以写一个UDF来解析。useragent用于表示用户的当前操作系统,浏览器版本信息,形如:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 S
原创
2评论
0点赞
发布博客于 7 年前

LeetCode——N-Queens II

Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.原题链接:https://oj.leetcode.com/problems/n-queens-ii/题目:求有多少个独立的解决方案
原创
0评论
0点赞
发布博客于 7 年前

LeetCode--N-Queens

The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct solutions to the n-queens puzzle.
原创
0评论
0点赞
发布博客于 7 年前

在Hadoop监控页面如何查看Hive的完整SQL

如图,这里只能看到简单的一段SQL,几乎看不出具体在执行什么任务。此时可以点开一个application,点击Tracking URL:ApplicationMaster进入到MapReduce Job job_1409xxxx,Job页面点击左侧的Configuration这里有此Job对应的所有参数,在 右上角的搜索框中输入string,其中key为 hive.
原创
0评论
1点赞
发布博客于 7 年前

LeetCode——Binary Tree Maximum Path Sum

Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 / \ 2 3Return 6.
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Construct Binary Tree from Inorder and Postorder Traversal

Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.原题链接:https://oj.leetcode.com/problems/construct-bi
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Construct Binary Tree from Preorder and Inorder Traversal

Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.原题链接:https://oj.leetcode.com/problems/construct-binary-
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Trapping Rain Water

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.For example, Given [0,1,0,2,1,0,1,3,2,1,2,1]
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Unique Binary Search Trees II

Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example,Given n = 3, your program should return all 5 unique BST's shown below. 1 3
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Rotate Image

You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?原题链接:https://oj.leetcode.com/problems/rotate-image/
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Divide Two Integers

Divide two integers without using multiplication, division and mod operator.原题链接:https://oj.leetcode.com/problems/divide-two-integers/题目:两数相除,不使用乘法、除法和模运算。思路:只能使用减法了,还有位运算可以当成乘除法来用。开始做的时候用
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Permutations II

Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique permutations:[1,1,2], [1,2,1], and [2,1,1].
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Next Permutation

Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Merge k Sorted Lists

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.原题链接:https://oj.leetcode.com/problems/merge-k-sorted-lists/题目:归并 k 个有序链表,返回一个有序链表。思路:之前有做过归并
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——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
原创
0评论
0点赞
发布博客于 7 年前

Python操作MySQL乱码问题解决

使用Python的MySQLdb模块连接并操作MySQL的时候,对于中文,查询时候查不出来,插入数据时候是乱码。很头疼。最后的解决办法如下:conn = MySQLdb.connect(...)cur = conn.cursor()cur.execute("SET NAMES utf8;") cur.execute("SET CHARACTER SET utf8;") cur.exec
原创
0评论
0点赞
发布博客于 7 年前

Hadoop MapReduce纵表转横表 与 横表转纵表

输入数据如下:以\t分隔0-3岁育儿百科 书 230-5v液位传感器 50-5轴承 20-6个月奶粉 230-6个月奶粉c2c报告 230-6个月奶粉在线购物排名 230-6个月奶粉市场前景 230-6个月配方奶粉 230.001g电子天平 50.01t化铝炉 20.01吨熔铝合金炉 20.03吨化镁炉
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——4Sum

Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note:Element
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——3Sum Closest

Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exact
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——3Sum

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:Elements in a triplet (a,b,c
原创
1评论
0点赞
发布博客于 7 年前

LeetCode——Set Matrix Zeroes

Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.原题链接:题目:给定一个m * n 的矩阵,如果有一个元素是0,将其所在行和列设为0.思路:先记录下是0 的元素的位置,再去置0. public void setZeroes(int[][] m
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Search a 2D Matrix

Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted from left to right.The first integer of each
原创
0评论
0点赞
发布博客于 7 年前

hadoop中文分词、词频统计及排序

有如图所示的输入文件。其中第一列代表ip地址,之后的偶数列代表搜索词,数字(奇数列)代表搜索次数,使用"\t"分隔。现在需要对搜索词进行分词并统计词频,此处不考虑搜索次数,可能是翻页,亦不考虑搜索链接的行为。
原创
4评论
5点赞
发布博客于 7 年前

CNZZ网站流量统计原理简析

这是我的网站www.iyizhan.com,其中只有一个页面index.html,在index.html上放置了如下的 js 脚本:src="http://s11.cnzz.com/stat.php?id=5364825&web_id=5364825" language="JavaScript">1.当用户访问这个页面时,会请求src,对应的是上面的脚本的源文件:
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Sort Colors

Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the integers
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Gray Code

The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total number of bits in the code, print the sequence of
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.原题链接:https://oj.leetcode.com/problems/merge-two-sorted-
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Merge Sorted Array

Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements fro
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Binary Tree Inorder Traversal

Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3,2].Note: Recursive solutio
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Permutations

Given a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1].原题链接:https://oj
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Convert Sorted List to Binary Search Tree

Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.原题链接:https://oj.leetcode.com/problems/convert-sorted-list-to-binary-search-tree/题目:给定一个
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Convert Sorted Array to Binary Search Tree

Given an array where elements are sorted in ascending order, convert it to a height balanced BST.原题链接:https://oj.leetcode.com/problems/convert-sorted-array-to-binary-search-tree/题目:给定一个升序排列元素的数组,将
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Rotate Image

You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?原题链接:https://oj.leetcode.com/problems/rotate-image/
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Insertion Sort List

Sort a linked list using insertion sort.原题链接:https://oj.leetcode.com/problems/insertion-sort-list/题目:用插入排序对一个链表排序。 public ListNode insertionSortList(ListNode head) { ListNode newHead = new L
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——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
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Search in Rotated Sorted Array II

Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Write a function to determine if a given target is in the
原创
0评论
0点赞
发布博客于 7 年前

Hive Python Streaming的原理及写法

在Hive中,需要实现Hive中的函数无法实现的功能时,就可以用Streaming来实现。其原理可以理解成:用HQL语句之外的语言,如Python、Shell来实现这些功能,同时配合HQL语句,以实现特殊的功能。比如,我有一张不同网站访问的日志表,其中有两个列是url和ref,分别代表当前访问的网址和来源地址,我想要查看用户的来源,即看用户都是从那些网站跳到这些网站上去的,这里有些网站可能域名
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [−2,1,−3,4,−1,2,1,−5,4],the contiguous subarray [4,−1,2,1] ha
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——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
原创
0评论
0点赞
发布博客于 7 年前

Spark,一种快速数据分析替代方案

虽然 Hadoop 在分布式数据分析方面备受关注,但是仍有一些替代产品提供了优于典型 Hadoop 平台的令人关注的优势。Spark 是一种可扩展的数据分析平台,它整合了内存计算的基元,因此,相对于 Hadoop 的集群存储方法,它在性能方面更具优势。Spark 是在 Scala 语言中实现的,并且利用了该语言,为数据处理提供了独一无二的环境。了解 Spark 的集群计算方法以及它与 Hado
转载
0评论
0点赞
发布博客于 7 年前

LeetCode——Populating Next Right Pointers in Each Node

题目: 给定一个二叉树(假设是完全二叉树),把每个节点的next指针指向其右侧节点。 思路:首先想到的是,层序遍历树,在遍历的同时添加节点对右侧节点的指针。另一种简洁的方法是采用递归来实现,间单直观。
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Search for a Range

题目:给定一个排好序的整数数组,找到给定目标值的出现的首尾位置。思路:二分查找。由于是有序数组,所以相同值的数是连续的,即只要找到其中一个,再向左右找到边界值就可以了,这三步均采用二分查找。
原创
0评论
0点赞
发布博客于 7 年前

LeetCode——Unique Binary Search Trees

Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's. 1 3 3 2 1 \
原创
0评论
0点赞
发布博客于 7 年前