- 博客(18)
- 资源 (7)
- 收藏
- 关注
原创 LeetCode(36) 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 f
2015-03-28 02:31:33 615
原创 LeetCode(30) Substring with Concatenation of All Words (java)
先占位 to be continued
2015-03-28 02:19:36 1888
原创 LeetCode(174) 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 initia
2015-03-28 02:02:34 1660
原创 Print A Tree In Vertical Order
参见 http://www.geeksforgeeks.org/print-binary-tree-vertical-order/ 1 首先定义 Vertical Order, 1 / \ 2 3 / \ / \ 4 5 6 7
2015-03-25 12:53:13 676
原创 LeetCode(188) Best Time to Buy and Sell Stock IV
题目如下: Best Time to Buy and Sell Stock Total Accepted: 43912 Total Submissions: 135635 My Submissions Question Solution Say you have an array for which the ith element is the price of a given stock
2015-03-23 08:37:09 2648
原创 LeetCode(37) 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
2015-03-23 07:55:02 1787
原创 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
2015-03-22 12:46:11 5570
原创 LeetCode(76)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
2015-03-22 08:05:39 3027 1
原创 LeetCode(187)Repeated DNA Sequence
题目如下: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated sequences within the DNA.
2015-03-21 07:45:35 801
原创 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 000
2015-03-21 06:22:53 1781
原创 LeetCode(189) Rotate Array
题目如下: Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. Note: Do it in place.Try to come up as many
2015-03-20 12:24:02 3495
原创 [draft]字符串匹配 Z_algorithm
Z algorithm 和字符串匹配的几个算法其实类似,主要利用了pattern的重复信息。 具体思想在这里,这个slides写得非常好懂。 还有个demo也很好。 我实现了一下code(暂时还没去测试是否bugfree) public class ZAlgo { private int [] z; private char [] text; public ZAlgo() {
2015-03-17 07:54:51 1442
原创 JAVA菜鸟入门(5) Hashmap vs Hashtable
1. Hashtable is synchronized, whereas HashMap is not. This makes HashMap better for non-threaded applications, as unsynchronized Objects typically perform better than synchronized ones. 2. Hashtabl
2015-03-05 08:46:51 751
原创 JAVA菜鸟入门(4) Int vs Integer
首先,Int 是个primitive type。 Integer 是个object, 是个class,是int的wrapper class。 然后, 什么时候用int什么时候用Integer呢? 其中,use it as a hashtable key的原因是, Immutable objects are much better suited to be Hashtable k
2015-03-05 08:43:24 1121
原创 LeetCode(51) 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 puzzl
2015-03-04 14:50:03 1129
原创 LeetCode(50) N-Queens II
题目如下: 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.
2015-03-04 12:53:36 797
数据挖掘--概念.模型.方法和算法
2009-09-20
机器学习 Tom Mitchell 中文版
2009-09-20
机器学习英文版Machine Learning(Mitchell)(下)
2009-09-14
机器学习英文版Machine Learning(Mitchell)(中)
2009-09-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人