题目:
Given a 2D board and a word, find if the word exists in the grid.
The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or ver...
分类:
编程语言 时间:
2015-01-15 16:14:27
阅读次数:
301
题目:
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Input:D...
分类:
编程语言 时间:
2015-01-11 14:56:20
阅读次数:
236
题目:
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 seque...
分类:
编程语言 时间:
2015-01-11 12:27:43
阅读次数:
282
题目:
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()", "()(()...
分类:
编程语言 时间:
2015-01-10 16:42:46
阅读次数:
261
题目:
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
For example,
If n = 4 and k = 2, a solution is:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],
...
分类:
编程语言 时间:
2015-01-10 11:20:00
阅读次数:
280
题目:
Given a collection of integers that might contain duplicates, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contai...
分类:
编程语言 时间:
2014-12-31 14:41:10
阅读次数:
277
一直以为梯度下降很简单的,结果最近发现我写的一个梯度下降特别慢,后来终于找到原因:step size的选择很关键,有一种叫backtracking line search的梯度下降法就非常高效,该算法描述见下图:下面用一个简单的例子来展示,给一个无约束优化问题:minimize y = (x-3)*...
分类:
其他好文 时间:
2014-12-30 01:40:15
阅读次数:
664
题目:(DP,BackTracking, Greedy,String)Implement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequ...
分类:
其他好文 时间:
2014-12-27 00:13:18
阅读次数:
292
题目:(Backtracking)The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting...
分类:
其他好文 时间:
2014-12-26 00:54:18
阅读次数:
213
题目:(DP ,BackTracking, String)Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more...
分类:
其他好文 时间:
2014-12-25 06:34:21
阅读次数:
169