码迷,mamicode.com
首页 >  
搜索关键字:humble numbers    ( 7694个结果
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 ...
分类:其他好文   时间:2014-05-16 23:18:16    阅读次数:360
LeetCode-004 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 numbers and return it as a linked list. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Out...
分类:其他好文   时间:2014-05-15 05:13:49    阅读次数:306
hdu how many prime numbers 筛选法求素数
/* * hdu How many prime numbers * date 2014/5/13 * state AC */ #include #include #include using namespace std; bool isPrime(int x) { int sqr=sqrt(x*1.0); for(int i=2;i<=sqr;i++) {...
分类:其他好文   时间:2014-05-15 05:07:18    阅读次数:261
LeetCode-001 Two Sum
LeetCode-001 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 to the target, where index1 must be less than index2...
分类:其他好文   时间:2014-05-15 04:34:50    阅读次数:293
Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:其他好文   时间:2014-05-14 23:11:14    阅读次数:398
LA 4727
Integers1, 2, 3,...,nare placed on a circle in the increasing order as in the following figure. We want to construct a sequence from these numbers on ...
分类:其他好文   时间:2014-05-14 02:54:10    阅读次数:354
poj 1715 Hexadecimal Numbers 排列组合
1 /** 2 大意: 给定16进制数的16个字母,,求第k大的数,,要求数的长度最大为8.,并且每个数互不相同。 3 思路: 从高到低挨个枚举,每一位能组成的排列数 ,拿最高位来说,能做成的排列数为15*A(15,len-i) 4 第二位 A(14,len-2)。。这样就可以...
分类:其他好文   时间:2014-05-13 21:58:38    阅读次数:402
【LeetCode】Triangle
TriangleGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given...
分类:其他好文   时间:2014-05-13 18:51:44    阅读次数:297
[ACM] 1016 Prime Ring Problem (深度优先搜索)
Prime Ring Problem Problem Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent...
分类:其他好文   时间:2014-05-13 11:54:17    阅读次数:444
leetcode --day12 Surrounded Regions & Sum Root to Leaf Numbers & Longest Consecutive Sequence
1、 ?? Surrounded Regions Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in that surrounded region. For e...
分类:其他好文   时间:2014-05-11 18:52:32    阅读次数:293
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!