码迷,mamicode.com
首页 >  
搜索关键字:note    ( 7358个结果
[C++]LeetCode: 88 Factorial Trailing Zeroes (阶乘后导零)
题目: Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 思路: 我们要计算 N! 中有多少个后导0. 我们来找一下规律,考虑n!的质数因子。后缀0,只有可能是质因子2...
分类:编程语言   时间:2015-01-11 16:16:18    阅读次数:272
leetcode----------Pascal's Triangle II
题目Pascal's Triangle II通过率29.8%难度EasyGiven an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you o...
分类:其他好文   时间:2015-01-10 11:09:53    阅读次数:169
[LeetCode]165 Compare Version Numbers
https://oj.leetcode.com/problems/compare-version-numbers/http://blog.csdn.net/u012243115/article/details/41969181publicclassSolution{ publicintcompareVersion(Stringversion1,Stringversion2){ if(version1==null||version2==null) return0;//Invalidinput. //NOTE!..
分类:其他好文   时间:2015-01-09 19:31:02    阅读次数:164
[leetcode] Construct Binary Tree from Preorder and Inorder Traversal
Construct Binary Tree from Preorder and Inorder TraversalGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume...
分类:其他好文   时间:2015-01-09 18:46:57    阅读次数:151
[leetcode] Construct Binary Tree from Inorder and Postorder Traversal
Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:You may assu...
分类:其他好文   时间:2015-01-09 15:29:53    阅读次数:115
LeetCode--4Sum
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: Element...
分类:其他好文   时间:2015-01-09 09:17:54    阅读次数:180
[LeetCode#99]Recover Binary Search Tree
The problem:Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(...
分类:其他好文   时间:2015-01-09 06:54:36    阅读次数:132
[LeetCode] Factorial Trailing Zeroes 阶乘末尾0
Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.Credits:Special thanks to@tsf...
分类:其他好文   时间:2015-01-09 00:00:03    阅读次数:531
LDA variational inference note, LDA 参数求解
1.LDA主题模型 给定先验概率参数αβ,主题混合参数θ,集合主题z,集合词w的联合分布为 (1)2.variational inference1>variational distribution variational inference algorithm 介绍的variational 分...
分类:其他好文   时间:2015-01-08 22:37:44    阅读次数:420
LeetCode: Subsets 解题报告
SubsetsGiven a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set mus...
分类:其他好文   时间:2015-01-08 21:27:08    阅读次数:361
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!