自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (18)
  • 收藏
  • 关注

原创 leetcode 190:Reverse Bits

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

2015-07-09 20:33:57 297

原创 leetcode 191:Number of 1 Bits

题目: Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11’ has binary representation 00000000

2015-07-09 20:27:58 316

原创 leetcode 70:Climbing Stairs

题目: You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? 分析: 考察动态规划,用户上楼梯,每次可迈1步或2步,现

2015-07-09 01:37:17 325

原创 leetcode 198:House Robber

题目: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent h

2015-07-09 01:24:41 345

原创 leetcode 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 defin

2015-07-09 01:09:57 310

原创 leetcode 202:Happy number

题目: Write an algorithm to determine if a number is “happy”.A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares

2015-07-08 13:16:36 386

原创 leetcode 66:plus one

题目: Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list. 分析: 本题是将整数n的每一位存储在数组中

2015-07-08 13:07:01 295

原创 leetcode 225:Implement Stack using Queues

题目: Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get the top element.empty() -- Return

2015-07-08 12:56:37 253

原创 leetcode 203:Remove Linked List Elements

题目: Remove all elements from a linked list of integers that have value val.Example Given: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6 Return: 1 –> 2 –> 3 –> 4 –> 5 分析: 本题考查链表的操作,要求删除列表元素,只要将指向被删除元素的

2015-07-07 15:20:19 348

原创 leetcode 204:Count Primes

题目: Description:Count the number of prime numbers less than a non-negative number, n. 分析: 本题是要统计0~n的素数个数,这个要根据hint中的提示,利用埃拉托色尼筛法,需要去除0~开根号n的倍数,比如从2开始,去除2*2,2*3,…;最后剩下的就是0~n的素数。 代码:public class coun

2015-07-07 15:11:27 224

原创 leetcode 205:Isomorphic Strings

题目: Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences of a character must be replaced with another

2015-07-07 15:01:13 228

原创 leetcode 231:Power of Two

题目: Given an integer, write a function to determine if it is a power of two. 分析: 本题需要判断一个数是否为2的n次方,通过观察2的n次方的十进制和二进制,可以发现一些规律: 1 2 4 8 16   ….1 10 100 1000 10

2015-07-06 17:07:36 232

原创 leetcode 155: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() -- G

2015-07-06 16:55:55 248

原创 leetcode 206:Reverse Linked List

题目: Reverse a singly linked list. 分析: 题目考察链表的反转,在这里主要是next指针的调整,利用指向前一个结点的指针before,指向后一个结点的指针followee,从而实现链表的反转。 代码:package Code;public class LinkedList { /** * 链表结点类 * @author Don

2015-07-06 16:48:25 233

原创 leetcode 217:Contains Duplicate

题目: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every elemen

2015-07-05 12:13:17 238

原创 leetcode 219:Contains Duplicate II

题目: Given an array of integers and an integer k, find out whether there there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and j is at most k.

2015-07-05 11:12:54 358

原创 leetcode 223:Rectangle Area

题目: Find the total area covered by two rectilinear rectangles in a 2D plane.Each rectangle is defined by its bottom left corner and top right corner as shown in the figure. Rectangle Area Assume tha

2015-07-05 10:50:39 426

原创 leetcode 226 :Invert Binary Tree

题目: Invert a binary tree.4 / \ 2 7 / \ / \ 1 3 6 9to4 / \ 7 2 / \ / \ 9 6 3 1 分析: 本题是对二叉树的操作,题目要求将二叉树反转,可以有递归和非递归两种实现方法,在编写测试用例的时候,需要构建二叉树和遍历二叉树,所以在代码中一致列

2015-07-04 11:41:07 521

原创 leetcode 228:Summary Ranges

leetcode 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”]. 分析: 这道题是对数组的操作,给定一

2015-07-04 11:29:19 292

原创 leetCode 6:ZigZag Conversion

leetCode 6:ZigZag Conversion题目: The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legib

2015-07-04 10:18:52 354

python 人脸识别

利用PCA进行人脸识别,python代码,网络上大多见到的是matlab实现,对matlab不熟的可以看看这篇代码加讲解的文档

2015-12-18

java实现朴素贝叶斯文本分类

利用java语言实现朴素贝叶斯,解决文本分类问题,可以看一看。

2015-09-12

自然语言处理综述中文版

自然语言处理综述中文版,可以帮助了解自然语言处理方面的知识,可以花时间看一看。

2015-09-12

文本分类 java代码

中文文本分类代码,java实现,对这方面感兴趣的可以看一看。

2015-08-24

矩阵论清华大学方保镕 教材以及课后习题答案

矩阵论清华大学方保镕教材以及课后习题答案,机器学习,推荐算法涉及到的矩阵知识都可以翻翻。

2015-08-21

推荐系统实践 项亮

推荐系统在当今大数据时代越来越得到普及,本书作为一本指导初学者入门推荐算法实现的好书值得阅读。

2015-08-21

最优化理论与算法 陈宝林教授

最优化理论与算法,陈宝林教授,很好的最优化方面的书籍。

2015-05-18

最优化理论与方法

最优化理论与方法,袁亚湘,最优化思想在算法中是很重要的!

2015-05-18

Online Learning 算法简介

Online Learning 算法简介,希望可以对理解Online Learning 算法有所帮助!

2015-05-18

reuters-21758java处理代码

reuters-21758源文档格式不能直接使用,在这里提供了java处理的程序。

2014-12-25

reuters-21578 转换txt格式Python代码

reuters-21578源文件格式是不能直接拿来用的,这里提供了python代码将文档转换成txt格式

2014-12-25

reuters-21578

reuters-21578,这是一个英文的语料库,可以用于进行文本的分类与聚类。是文本分类领域共用的一个语料库。

2014-12-25

基于图的推荐算法 c,c++ 实现 代码 项亮 随机游走

基于图的推荐算法 c,c++ 实现 代码 项亮 随机游走

2014-12-05

推荐系统实践扫描版,内有代码,适合帮助程序实现算法

推荐系统实践扫描版,内有代码,帮助加深对推荐系统的学习,书中附有实例和算法实现,挺不错!

2014-12-05

空空如也

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

TA关注的人

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