随笔分类 - Lintcode
摘要:Given an array of integers, find a contiguous subarray which has the largest sum. Notice The subarray should contain at least one number. Example Give
        阅读全文
            
摘要:A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. Return a deep copy
        阅读全文
            
摘要:Convert a binary search tree to doubly linked list with in-order traversal. Have you met this question in a real interview? Yes Convert a binary searc
        阅读全文
            
摘要:Calculate the an % b where a, b and n are all 32bit integers. Analyse: divide and conquer. Be aware of overflow. Runtime: 12ms
        阅读全文
            
摘要:Print numbers from 1 to the largest number with N digits by recursion. Notice It's pretty easy to do recursion like: recursion(i) { if i > largest num
        阅读全文
            
摘要:Implement pow(x, n). Runtime: 23ms Analyse: Be aware of corner cases. For exmaple, x = 0, n = 0, n = 1, and n < 0. Note the highlited area, if n == IN
        阅读全文
            
                    
                
浙公网安备 33010602011771号