随笔分类 - Lintcode
摘要:Given an array of integers, find the subarray with smallest sum. Return the sum of the subarray. Notice The subarray should contain one integer at lea
        阅读全文
            
摘要:Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3].... Notice Please complete the problem in-place. 
        阅读全文
            
摘要:Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integ
        阅读全文
            
摘要:Given a non-overlapping interval list which is sorted by start point. Insert a new interval into it, make sure the list is still in order and non-over
        阅读全文
            
摘要:Design an iterator over a binary search tree with the following rules: Elements are visited in ascending order (i.e. an in-order traversal) next() and
        阅读全文
            
摘要:Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, 
        阅读全文
            
摘要:Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. Given a 2D binary matrix filled with
        阅读全文
            
摘要:Given a list, each element in the list can be a list or integer. flatten it into a simply list with integers. Notice If the element in the given list 
        阅读全文
            
摘要:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. Notice Bonus point if you
        阅读全文
            
摘要:There is a fence with n posts, each post can be painted with one of the k colors.You have to paint all the posts such that no more than two adjacent f
        阅读全文
            
摘要:Give an integer array,find the longest increasing continuous subsequence in this array. An increasing continuous subsequence: Can be from right to lef
        阅读全文
            
摘要:Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return
        阅读全文
            
摘要:Given a digit string excluded 01, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on
        阅读全文
            
摘要:Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges mak
        阅读全文
            
摘要:Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. How we serialize an undirected graph: Nodes are labele
        阅读全文
            
摘要:Given string A representative a positive integer which has N digits, remove any k digits of the number, the remaining digits are arranged according to
        阅读全文
            
摘要:Given a list of non negative integers, arrange them such that they form the largest number. Notice The result may be very large, so you need to return
        阅读全文
            
摘要:Given n pieces of wood with length L[i] (integer array). Cut them into small pieces to guarantee you could have equal or more than k pieces with the s
        阅读全文
            
摘要:Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two n
        阅读全文
            
摘要:Given two strings, find the longest common substring. Return the length of it. Notice The characters in substring should occur continuously in origina
        阅读全文
            
                    
                
浙公网安备 33010602011771号