Given a binary tree, flatten it to a linked list in-place.
For example,
Given
         1
        /        2   5
      / \        3   4   6
The flattened tree should look like:
   1
   ...
                            
                            
                                分类:
其他好文   时间:
2015-01-30 22:58:55   
                                阅读次数:
299
                             
                    
                        
                            
                            
                                题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1102Problem DescriptionThere are N villages, which are numbered from 1 to N, and you should build some ...
                            
                            
                                分类:
其他好文   时间:
2015-01-30 22:20:50   
                                阅读次数:
195
                             
                    
                        
                            
                            
                                看configurure字段有木有driver字样,若有内容,则显卡驱动装好了。
sudo lshw -c video
WARNING: you should run this program as super-user.
^CI (sysfs)  
chenghao@chenghao-Lenovo-Product:~$ sudo lshw -c video
[sudo] passwor...
                            
                            
                                分类:
系统相关   时间:
2015-01-30 17:45:23   
                                阅读次数:
247
                             
                    
                        
                            
                            
                                题目Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the va...
                            
                            
                                分类:
系统相关   时间:
2015-01-30 17:19:54   
                                阅读次数:
162
                             
                    
                        
                            
                            
                                Given an array of integers,every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement itwithout using extra m...
                            
                            
                                分类:
其他好文   时间:
2015-01-30 09:10:45   
                                阅读次数:
247
                             
                    
                        
                            
                            
                                本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43302355
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm...
                            
                            
                                分类:
其他好文   时间:
2015-01-30 09:01:47   
                                阅读次数:
177
                             
                    
                        
                            
                            
                                // table row // table head // table data Atypeattribute that should always be equal to"text/css"Arelatt...
                            
                            
                                分类:
Web程序   时间:
2015-01-30 01:19:08   
                                阅读次数:
319
                             
                    
                        
                            
                            
                                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 numbers such that they add up to the target, whe...
                            
                            
                                分类:
其他好文   时间:
2015-01-29 19:32:38   
                                阅读次数:
147
                             
                    
                        
                            
                            
                                用VS的NMAKE构建,不会报错,但是用GNU MAKE构建,就会报错。(尝试删除Toast.h中第24行的声明)因此在遇到类似的情况的时候,记得不仅class里面要有friend声明,namespace里面也要有声明点此下载demo
                            
                            
                                分类:
其他好文   时间:
2015-01-29 19:14:24   
                                阅读次数:
121
                             
                    
                        
                            
                            
                                题目:
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first
 two lists.
我的解法:
(1)算法思想:
先根据两个链表l1,l2头结点值的大小设置要返回链表的头结点h...
                            
                            
                                分类:
其他好文   时间:
2015-01-29 17:44:28   
                                阅读次数:
116