一道高精度计算的题,从低位到高位进行计算,同时考虑进位的问题,若最高位计算结果还有进位,就需要在最高位前面添加一位。可做到时间复杂度为O(n),空间复杂度为O(1)。...
分类:
其他好文 时间:
2015-09-11 14:31:00
阅读次数:
144
这是一篇记录式散文,没有一、二、三,One、Two、Three、Go的格式了,看客多包涵。 那是8月28号的下午,有一名失身多年的单身哥在群里截图说网站访问不了,那是我不在意的二级域名的链接,我不经心点看了一下,咦,竟然是真的不行
分类:
其他好文 时间:
2015-09-11 12:27:04
阅读次数:
148
public class Media // One entity table{ public int Id { get; set; } public string Name { get; set; } public bool Enabled { get; set; } pub...
分类:
其他好文 时间:
2015-09-11 12:18:20
阅读次数:
135
Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + ...
分类:
其他好文 时间:
2015-09-11 12:10:30
阅读次数:
111
Given a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is like:3 + ...
分类:
其他好文 时间:
2015-09-11 08:00:46
阅读次数:
125
QuestionGiven a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant dig...
分类:
其他好文 时间:
2015-09-11 06:45:53
阅读次数:
193
QuestionGiven two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array.Note:You may assume thatnums1has enough space (size that ...
分类:
其他好文 时间:
2015-09-11 06:43:13
阅读次数:
130
One-pass Greedy solution. So beautiful.class Solution {public: void wiggleSort(vector& nums) { for(int i = 1; i nums[i]) ...
分类:
其他好文 时间:
2015-09-11 06:38:20
阅读次数:
158
Python’s handling of default parameter values is one of a few things that tends to trip up most new Python programmers (but usually only once).What ca...
分类:
编程语言 时间:
2015-09-11 00:08:52
阅读次数:
366
Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie...
分类:
其他好文 时间:
2015-09-10 19:34:29
阅读次数:
159