码迷,mamicode.com
首页 >  
搜索关键字:humble numbers    ( 7694个结果
006:欧拉项目平方和与和的平方的差
Sum square difference Problem 6 The sum of the squares of the first ten natural numbers is, 12 + 22 + ... + 102 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ....
分类:其他好文   时间:2014-05-23 02:22:57    阅读次数:193
5.29 调整数组顺序使奇数位于偶数前面(QuickSort)
Reorder an array so that odd numbers come before even numbers.
分类:其他好文   时间:2014-05-22 00:38:39    阅读次数:259
38.输出1到最大的N位数
Print 1 to max N bits numbers.
分类:其他好文   时间:2014-05-22 00:21:45    阅读次数:241
【Leetcode】Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:其他好文   时间:2014-05-21 17:51:09    阅读次数:190
LeetCode: Combination Sum II [039]
【题目】 Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in the combination. Note: All numbers (including target) will be ...
分类:其他好文   时间:2014-05-21 15:55:25    阅读次数:259
LeetCode: Combination Sum [038]
【题目】 Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimited number of times. Note: All numbers (including target) w...
分类:其他好文   时间:2014-05-21 15:21:28    阅读次数:292
LeetCode: Multiply Strings [042]
【题目】 Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-negative. 【题意】 给定用字符串表示的整数,返回两个数的乘积结果字符串。两个数字都非负,且能任意大。 【思路】 1. 考虑其中一个数是0的情况 2. 模拟乘法运算...
分类:其他好文   时间:2014-05-21 13:45:37    阅读次数:214
leetcode -day20 Add Two Numbers
1、 ?? Add Two Numbers  You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two num...
分类:其他好文   时间:2014-05-21 10:49:10    阅读次数:221
UVA 10712 - Count the Numbers (数位DP)
UVA 10712 - Count the Numbers 题目链接 题意:求区间[A,B]数字中,子串包含N的数字有多少个 思路:数位DP,写了个记忆化乱搞搞过了,dp[i][j][2][2][2],分别表示i位的时候,末尾为j的情况,后面3维用来处理小于的情况,已经出现过子串的情况,前导0的情况,然后注意特判一下数字0的情况,因为一开始要分解数字,而0是不能分解的。 代...
分类:其他好文   时间:2014-05-21 09:11:44    阅读次数:264
LeetCode:Two Sum
题目:       Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up t...
分类:其他好文   时间:2014-05-21 07:42:18    阅读次数:230
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!