题目描述
链接地址
解法
算法解释题目描述Given 2*n + 1 numbers, every numbers occurs twice except one, find it. ExampleGiven [1,2,2,1,3,4,3], return 4链接地址http://www.lintcode.com/en/problem/single-number/解法 int singleNu...
分类:
其他好文 时间:
2015-07-19 20:14:13
阅读次数:
137
Number of 1 BitsTotal Accepted:38248Total Submissions:101730My SubmissionsQuestionSolutionWrite a function that takes an unsigned integer and returns ...
分类:
其他好文 时间:
2015-07-19 19:33:51
阅读次数:
107
题目链接:https://leetcode.com/problems/reverse-nodes-in-k-group/
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not...
分类:
其他好文 时间:
2015-07-19 18:04:26
阅读次数:
128
Problem Definition: Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity.Sol.....
分类:
其他好文 时间:
2015-07-19 17:48:13
阅读次数:
91
Let p(n) represent the number of different ways in which n coins can be separated into piles. For example, five coins can be separated into piles in exactly seven
different ways, so p(5)=7.
...
分类:
其他好文 时间:
2015-07-19 16:35:22
阅读次数:
181
We'll defineS(n)for positive integernas follows: the number of then's digits in the decimal base. For example,S(893)?=?3,S(114514)?=?6.You want to mak...
分类:
其他好文 时间:
2015-07-19 16:13:36
阅读次数:
95
Source insight最新版本3572下载链接:http://www.sourceinsight.com/down35.html, http://www.sourceinsight.com/distribute/Si3570Setup.exe注冊号:SI3US-205035-364481.卸....
分类:
其他好文 时间:
2015-07-19 16:11:57
阅读次数:
732
http://acm.hdu.edu.cn/showproblem.php?pid=3652大致题意:"B-number"即一个整数含有子串"13"且被13整除。求1-n之间这种数的个数。思路:有两个限制条件:含有子串“13”和能被13整除。那么设dp[site][mod][flag]。表示到第si...
分类:
其他好文 时间:
2015-07-19 14:47:22
阅读次数:
92
The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font fo...
分类:
其他好文 时间:
2015-07-19 14:45:18
阅读次数:
113
题目如下:
The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. For example, given N being 12, there a...
分类:
其他好文 时间:
2015-07-19 13:28:24
阅读次数:
131