摘要:        
The trade off should be considered: In fact, there has to be one operation's time complexity is O(n) and the other is O(1), no matter add or find. So     阅读全文
posted @ 2015-01-27 12:51
neverlandly
阅读(3524)
评论(0)
推荐(0)
            
        
        
摘要:        
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function ...    阅读全文
posted @ 2015-01-27 12:02
neverlandly
阅读(400)
评论(0)
推荐(0)
            
        
        
摘要:        
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeating,...    阅读全文
posted @ 2015-01-27 09:10
neverlandly
阅读(391)
评论(0)
推荐(0)
            
        
        
摘要:        
这道题的意思用一个例子说明就是1.2 < 1.10, 因为1.10跟1.1是不一样的,1.10代表tenth revision. 而1.1代表first revision。所以这道题要按“.”分段,然后分段比较,方法是用split函数把string 分段,每一段挨个比过去。这里参考了网上的一个小技巧    阅读全文
posted @ 2015-01-27 05:09
neverlandly
阅读(461)
评论(0)
推荐(0)
    
                    
                
浙公网安备 33010602011771号