A university network is composed of N computers. 
System administrators gathered information on the traffic between nodes, and 
carefully divided the ne...
                            
                            
                                分类:
其他好文   时间:
2014-05-26 21:07:48   
                                阅读次数:
329
                             
                         
                    
                        
                            
                            
                                Reverse Words in a String反转一个字符串垃圾方法:#include 
#include class Solution {public: void reverseWords(string &s) { 
istringstream is(s); st...
                            
                            
                                分类:
其他好文   时间:
2014-05-26 13:39:16   
                                阅读次数:
271
                             
                         
                    
                        
                            
                            
                                Given a linked list and a value x, partition it 
such that all nodes less than x come before nodes greater than or equal to x.You 
should preserve the o...
                            
                            
                                分类:
其他好文   时间:
2014-05-26 09:35:28   
                                阅读次数:
266
                             
                         
                    
                        
                            
                            
                                数组属性length计算长度方法join()将数组元素组合成reverse()反转数组sort()进行排序内置函数eval(string)eval函数直接计算出string的值isNaN(变量)检验参数是否是一个数字,如果不是数字返回trueString对象属性length返回字符串的长度方法big...
                            
                            
                                分类:
编程语言   时间:
2014-05-26 08:15:15   
                                阅读次数:
241
                             
                         
                    
                        
                            
                            
                                Emag eht htiw Em PlehTime Limit: 1000MSMemory 
Limit: 65536KTotal Submissions: 2578Accepted: 1731DescriptionThis problem is a 
reverse case of the probl...
                            
                            
                                分类:
其他好文   时间:
2014-05-26 06:21:53   
                                阅读次数:
297
                             
                         
                    
                        
                            
                            
                                问题:给定一个字符串,字符串中包含若干单词,每个单词间由空格分隔,将单词逆置,即第一个单词成为最后一个单词,一次类推。
说明:字符串本身可能包含前导空格或后导空格,单词间可能包含多个空格,要求结果中去掉前导和后导空格,单词间空格只保留一个。
与rotate函数类似,先逆置每个单词,再将所有字符串逆置。
 void reverseWords(string &s) {
	if(s.si...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 18:49:26   
                                阅读次数:
249
                             
                         
                    
                        
                            
                            
                                Reverse Nodes in k-Group...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 18:35:48   
                                阅读次数:
225
                             
                         
                    
                        
                            
                            
                                Given a binary tree, find its maximum depth.The 
maximum depth is the number of nodes along the longest path from the root node 
down to the farthest le...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 16:05:56   
                                阅读次数:
239
                             
                         
                    
                        
                            
                            
                                Evaluate the value of an arithmetic expression 
inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an 
integer or another express...
                            
                            
                                分类:
其他好文   时间:
2014-05-22 15:28:54   
                                阅读次数:
175