码迷,mamicode.com
首页 >  
搜索关键字:solution    ( 11547个结果
隐马尔可夫模型HMM与维特比Veterbi算法(二)
隐马尔可夫模型HMM与维特比Veterbi算法(二)主要内容:前向算法(Forward Algorithm)穷举搜索( Exhaustive search for solution)使用递归降低问题复杂度前向算法的定义程序实现前向算法举例说明前向算法一、前向算法(Forward Algorithm)...
分类:其他好文   时间:2014-05-18 19:05:07    阅读次数:389
LeetCode 016 3Sum Closest
【题目】 Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution. For example, given array S = {...
分类:其他好文   时间:2014-05-18 10:37:57    阅读次数:269
LeetCode: Generate Parentheses [021]
【题目】 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: "((()))", "(()())", "(())()", "()(())", "()()()" 【题意】 给定n对括号,输出所有可行的括号组合字符串。所谓合法,就是可以Valid Pare...
分类:其他好文   时间:2014-05-18 09:06:41    阅读次数:266
LeetCode--Symmetric Tree
对于本题,想到一个中序遍历后,判别是否为回文串的方法,却WA多次 class Solution { public: vector vectorValue; void inOrder(TreeNode* root) { if(root!=NULL) { inOrder(root->left);...
分类:其他好文   时间:2014-05-18 06:38:58    阅读次数:294
[LeetCode]3Sum Closest
3SumClosest Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution....
分类:其他好文   时间:2014-05-18 05:57:48    阅读次数:244
Machine learning with python - Linear Regression
Machine learning with python Linear Regression 数据来自 cs229 Problem Set 1 (pdf)Data:q1x.dat,q1y.dat,q2x.dat,q2y.datPS1 Solution (pdf)从左上往右下 batchG...
分类:编程语言   时间:2014-05-17 23:05:44    阅读次数:525
Java Concurrency In Practice -Chapter 2 Thread Safety
This post introduces the challenge and related solution (Atomic, Locks) on Thread Safety.
分类:编程语言   时间:2014-05-17 21:09:33    阅读次数:500
Leetcode | Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:其他好文   时间:2014-05-17 14:45:17    阅读次数:290
LeetCode Scramble String
class Solution {public: bool isScramble(string s1, string s2) { int len = s1.length(); if (len == 1 && s1[0] == s2[0]) return true; ...
分类:其他好文   时间:2014-05-16 00:38:48    阅读次数:317
sgu 101 domino
题意还算简洁明了,加上有道翻译凑过着读完了题。题意大体上是 给你n个多米诺骨牌, 给出每个骨牌两端的数字, 只有数字相同才可以推到, 比如 2-3和3-2。你可以旋转这些多米诺骨牌, 输出一个可以全部推到的方案, 如果没有 ,输出 No solution。 第一眼看上去像爆搜, 但是 n 最大...
分类:其他好文   时间:2014-05-15 17:17:21    阅读次数:422
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!