Given a triangle, find the minimum path sum from 
top to bottom. Each step you may move to adjacent numbers on the row below.For 
example, given the fol...
                            
                            
                                分类:
其他好文   时间:
2014-05-08 21:08:25   
                                阅读次数:
407
                             
                    
                        
                            
                            
                                练习题(这里贴的是自己写的代码, 
网上给的题目代码我会附加在最下面)1.编写shell脚本,计算1-100的和; 1 #!/bin/bash 2 #caculate the sum of 
numbers from 1 to 100 3 4 sum=0 5 for i in `seq 1 100`;....
                            
                            
                                分类:
其他好文   时间:
2014-05-07 19:34:54   
                                阅读次数:
305
                             
                    
                        
                            
                            
                                Problem:In the 2020 grid below, four numbers 
along a diagonal line have been marked in red.08 02 22 97 38 15 00 40 00 75 04 
05 07 78 52 12 50 77 91 08...
                            
                            
                                分类:
其他好文   时间:
2014-05-06 14:35:55   
                                阅读次数:
460
                             
                    
                        
                            
                            
                                # Definition for a binary tree node# class 
TreeNode:# def __init__(self, x):# self.val = x# self.left = None# self.right 
...
                            
                            
                                分类:
其他好文   时间:
2014-05-05 22:56:23   
                                阅读次数:
419
                             
                    
                        
                            
                            
                                Implement next permutation, which rearranges 
numbers into the lexicographically next greater permutation of numbers.If such 
arrangement is not possibl...
                            
                            
                                分类:
其他好文   时间:
2014-05-05 22:19:17   
                                阅读次数:
312
                             
                    
                        
                            
                            
                                We consider permutations of the numbers 1,..., N
for some N. By permutation we mean a rearrangment of the
number 1,...,N. For example
2  4  5  1  7  6  3  8
is a permutation of 1,2,...,8. Of cours...
                            
                            
                                分类:
其他好文   时间:
2014-05-04 18:38:14   
                                阅读次数:
341
                             
                    
                        
                            
                            
                                Given a collection of numbers that might 
contain duplicates, return all possible unique permutations.For 
example,[1,1,2]have the following unique perm...
                            
                            
                                分类:
其他好文   时间:
2014-05-04 10:20:44   
                                阅读次数:
240
                             
                    
                        
                            
                            
                                Input
t – the number of numbers in list, then t lines follow [t 
Each line contains one integer: N [0 N 
Output
Output given numbers in non decreasing order.
Example
Input:
5
5
3
...
                            
                            
                                分类:
其他好文   时间:
2014-05-04 00:04:09   
                                阅读次数:
376
                             
                    
                        
                            
                            
                                Vitaly has an array of n distinct integers. Vitaly wants to divide this array into three non-empty sets
 so as the following conditions hold:
The product of all numbers in the first set is less ...
                            
                            
                                分类:
其他好文   时间:
2014-05-03 23:51:19   
                                阅读次数:
621
                             
                    
                        
                            
                            
                                Let's consider a triangle of numbers in which a number appears in the first line, two numbers appear in the second line, three in the third line, etc. Develop a program which will compute the largest ...
                            
                            
                                分类:
其他好文   时间:
2014-05-03 17:32:22   
                                阅读次数:
284