码迷,mamicode.com
首页 >  
搜索关键字:consecutive numbers    ( 8082个结果
Problem 003——palindromes
Problem ThreepalindromesA regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCB...
分类:其他好文   时间:2014-10-30 07:09:03    阅读次数:271
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-10-29 16:49:45    阅读次数:220
Single Number
Problem Discription: Suppose the array A has n items in which all of the numbers apear 3 times except one. Find the single number. int singleNumber2(....
分类:其他好文   时间:2014-10-29 14:37:46    阅读次数:170
[Leetcode] Triangle
Given 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 the fol...
分类:其他好文   时间:2014-10-29 14:36:46    阅读次数:217
linq中let关键字学习
linq中let关键字就是对子查询的一个别名,let子句用于在查询中添加一个新的局部变量,使其在后面的查询中可见。linq中let关键字实例1、传统下的子查询与LET关键字的区别C# 代码 复制static void Main(string[] args){ int[] numbers = n...
分类:其他好文   时间:2014-10-29 14:30:10    阅读次数:215
LeetCode: Multiply Strings. Java
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. public class Solution { //模拟手算乘法 ...
分类:编程语言   时间:2014-10-29 09:14:28    阅读次数:168
leetcode Permutations
题目:Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3],[2,3,1],...
分类:其他好文   时间:2014-10-29 01:57:39    阅读次数:189
Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".思路简单(同Add Two Numbers),可从代码得知,需要注意字符在字符串中的插入;co...
分类:其他好文   时间:2014-10-28 23:59:02    阅读次数:343
UVA1406 - A Sequence of Numbers(树状数组)
UVA1406 - A Sequence of Numbers(树状数组) 题目链接 题目大意: 给定N个数字,给两种操作:C x: 把这N个数字都加上x。Q x:查询这N个数里面有多少个数字和2^x取且大于0.最后把每个查询的结果求和作为答案。 解题思路: 查询与2^x取且为1,那么就意味这那个符合要求的数的第x位要是1。 但是这里还有全部加上x的操作,可以用一个变量来记...
分类:编程语言   时间:2014-10-28 20:06:33    阅读次数:228
Joining strings
When working with variables that contain strings or numbers. There's often a need to join their values. Either to display directly on screen or to sto...
分类:其他好文   时间:2014-10-28 13:37:01    阅读次数:178
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!