自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(34)
  • 问答 (2)
  • 收藏
  • 关注

原创 特征工程:信息熵、信息增益、信息增益率

信息增益和特征工程

2017-08-16 16:30:01 2925

原创 集成学习方法

集成学习(ensemble learning)通过构建并结合多个学习器来完成学习任务,有时也被称为多分类器系统(multi-classifier system)。

2017-04-11 11:33:58 3070

原创 leetCode No.143 Reorder List

Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes’ values.For

2016-11-16 12:42:36 530

原创 leetCode No.147 Insertion Sort

Sort a linked list using insertion sort

2016-11-15 18:43:39 398

原创 leetCode No.103 Binary Tree Zigzag Level Order Traversal

Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alternate between).

2016-11-02 21:38:51 345

原创 leetCode No.130 Surrounded Regions

题目Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'.A region is captured by flipping all 'O's into 'X's in that surrounded region.

2016-11-01 18:38:19 356

原创 leetCode No.435 Non-overlapping Intervals

题目Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.Note:You may assume the interval’s end point is always big

2016-10-31 17:31:25 1215

原创 leetCode No.199 Binary Tree Right Side View

Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.

2016-10-27 15:29:08 378

原创 python通过MySQLdb操纵mysql

连接数据库: conn = MySQLdb.connect(IP, USER, PASSWORD, DBNAME)创建表:sql = """CREATE TABLE EMPLOYEE ( FIRST_NAME CHAR(20) NOT NULL, LAST_NAME CHAR(20), AGE INT, SEX CHA

2016-10-25 20:55:27 382

原创 leetCode No.424 Longest Repeating Character Replacement

题目Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Find the length of a longest substring containing all rep

2016-10-17 17:34:51 1079

原创 leetCode No.107 Binary Tree Level Order Traversal II

题目Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree [3,9,20,null,null,15,7]

2016-10-11 20:26:08 377

原创 leetCode No.417 Pacific Atlantic Water Flow

题目Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the “Pacific ocean” touches the left and top edges of the matrix and the “Atlantic ocean” touc

2016-10-10 20:33:46 1291

原创 leetCode No.416 Partition Equal Subset Sum

题目Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal.Note:Both the array size and

2016-10-09 22:29:07 1470

原创 leetCode No.98 Validate Binary Search Tree

题目 Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node’s key

2016-10-08 16:43:36 450

原创 RabbitMQ-cpp使用——安装

本文章将介绍在centos系统安装rabbitcpp的步骤。 本文使用的rabbitMQ开发库是AMQP-CPP安装gityum install git下载AMQP-CPPgit clone https://github.com/CopernicaMarketingSoftware/AMQP-CPP.git安装g++yum install gcc-c++安装rabbitMQmake make in

2016-09-16 22:03:12 1178

原创 leetCode No.152 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 pro

2016-09-13 12:02:30 390

原创 leetCode No.228 Summary Ranges

题目 Given a sorted integer array without duplicates, return the summary of its ranges. For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"]. 标签:array 相似问题: (M) Missing Ranges, (H) Data Str

2016-09-08 23:49:36 361

原创 LeetCode No.200 Number of Islands

题目Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assum

2016-09-06 12:21:17 431

原创 c++学习笔记(2)字符串

1.字符串1.1定义和初始化string对象 string s1;//默认初始化s1是一个空字符串 string s2(s1);//s2是s1的副本 string s2 = s1;//等价于s2(s1),s2是s1的副本 string s3("value");//s3是字面值“value”的副本,除了字面值最后的那个空字符外 string s3 = "value

2016-09-05 23:45:31 379

原创 leetCode No.378 Kth Smallest Element in a Sorted Matrix

题目Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Note that it is the kth smallest element in the sorted order, not

2016-09-05 20:44:52 356

原创 c++学习笔记(1)复合类型

复合类型是指基于其他类型定义的类型。接下来介绍c++复合类型中的两种:应用和指针。1.引用1.1引用即别名通过将声明符写成&d的形式来定义应用数据类型,其中d是声明的变量名。 int a = 0;//声明基本数据类型 int &refa = a;//声明引用数据类型,refa指向a,是a的另外一个名字 int &refb;//错误,引用必须被初始化为什

2016-09-04 17:16:42 527

原创 leetCode No.151 Reverse Words in a String

题目For example,Given s = “the sky is blue“,return “blue is sky the“.Clarification:What constitutes a word?A sequence of non-space characters constitutes a word.Could the input string contain leadi

2016-09-04 15:00:15 455

原创 leetCode No.5 Longest Palindromic Substring

题目Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.标签:String 相似题目: (H) Shor

2016-09-03 23:26:14 354

原创 LeetCode No.3 Longest Substring Without Repeating Characters

题目Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "b", with the

2016-09-02 21:15:57 313

原创 mongodb学习(1)centos环境下安装mongodb

服务器环境操作系统 CentOS 7.2 64位CPU 1核内存 1GB步骤1.下载mongodb压缩包wget https://fastdl.mongodb.org/linux/mongodb-linux-i686-2.6.7.tgz?_ga=1.68265944.858401362.14212169072.解压缩tar -zxvf mongodb-linux-i686-2.6.7.

2016-09-02 02:01:43 464

原创 leetCode No.134 Gas Station

题目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

2016-09-02 01:34:28 403

原创 leetCode No.268 Missing Number

题目Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For example,Given nums = [0, 1, 3] return 2.Note:Your algorithm should run in

2016-09-02 00:40:23 350

原创 logistic回归

回归的简单解释:假设现在有一些数据点,我们用一条直线对这些点进行拟合(该线称为最佳拟合直),这个拟合过程就称作回归。利用Logistic回归进行分类的主要思想是:根据现有数据对分类边界线建立回归公式,以此进行分类。Sigmoid函数和Logistic回归我们想要的函数是可以接受所有的输入然后预测出类别。Sigmoid函数是一个阶跃函数,且跳跃点不是像海维赛德阶跃函数(Heaviside step f

2016-09-01 14:57:37 1515

原创 leetCode No.238 Product of Array Except Self

题目Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].Solve it without division and in O(n).

2016-09-01 00:53:20 395

原创 leetCode No.58 Length of Last Word

题目Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is define

2016-09-01 00:31:19 487

原创 leetCode No.221 Maximal Square

题目Given a 2D binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and return its area.For example, given the following matrix:1 0 1 0 01 0 1 1 11 1 1 1 11 0 0 1 0Re

2016-08-30 23:44:07 418

原创 leetCode No.53 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] has t

2016-08-30 10:27:13 645

原创 Python + Tweepy 实现Twitter信息抓取(1)——准备阶段

基于国内被墙的情况实现Python + Tweepy Twitter信息抓取

2016-07-11 10:25:28 15962 5

原创 关于《海量用户积分算法探讨》的读后总结和扩展

周末在看《码农 第一期 算法》的时候看到了这样一篇文章:《海量用户积分算法探讨》以下是原文地址:http://www.ituring.com.cn/article/62896下面是我的一些总结和讨论需要解决的问题是:某海量用户网站,用户拥有积分,积分可能会在使用过程中随时更新。现在要为该网站设计一种算法,在每次用户登录时显示其当前积分排名。用户最大规模为2亿;积分为非负整数,且小于

2016-03-05 08:52:28 940

空空如也

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

TA关注的人

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