码迷,mamicode.com
首页 >  
搜索关键字:backtracking    ( 114个结果
[C++]LeetCode: 97 Word Search (深度优先搜索)
题目: 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
[C++]LeetCode: 87 Letter Combinations of a Phone Number
题目: 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
[C++]LeetCode: 86 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 seque...
分类:编程语言   时间:2015-01-11 12:27:43    阅读次数:282
[C++]LeetCode: 84 Generate Parentheses (卡特兰数)
题目: 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
[C++]LeetCode: 83 Combinations (回溯法)
题目: 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
[C++]LeetCode: 64 Subsets II
题目: 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
重新发现梯度下降法--backtracking line search
一直以为梯度下降很简单的,结果最近发现我写的一个梯度下降特别慢,后来终于找到原因:step size的选择很关键,有一种叫backtracking line search的梯度下降法就非常高效,该算法描述见下图:下面用一个简单的例子来展示,给一个无约束优化问题:minimize y = (x-3)*...
分类:其他好文   时间:2014-12-30 01:40:15    阅读次数:664
[leetcode] Wildcard Matching
题目:(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
[leetcode] Grey Code
题目:(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
[leetcode] Regular Expression Matching
题目:(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
114条   上一页 1 ... 8 9 10 11 12 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!