There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh ...
                            
                            
                                分类:
其他好文   时间:
2016-05-04 22:38:00   
                                阅读次数:
140
                             
                         
                    
                        
                            
                            
                                There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh ...
                            
                            
                                分类:
其他好文   时间:
2016-04-26 09:39:55   
                                阅读次数:
148
                             
                         
                    
                        
                            
                            
                                Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 这是一道hard的题目,但是其实思路并不复杂,做起来也比较有趣。做完Merge Two Sorted  ...
                            
                            
                                分类:
其他好文   时间:
2016-04-24 17:15:37   
                                阅读次数:
125
                             
                         
                    
                        
                            
                            
                                    if-statements can add serious complexity and beg for refactoring. You can use polymorphic functions to simplify your ifs and dynamically call the appr ...
                            
                            
                                分类:
编程语言   时间:
2016-04-24 06:07:13   
                                阅读次数:
139
                             
                         
                    
                        
                            
                            
                                题目:
  Merge k sorted
 linked lists and return it as one sorted list. Analyze and describe its complexity.
题目大意:
  给定k条有序链表,求k条链表有序合并后的链表。
思路:
  看到这道题感觉蛮亲切的,因为已经不止一次遇到链表有序合并的问题了,所以思路还是有的。
  第一...
                            
                            
                                分类:
其他好文   时间:
2016-04-22 20:56:10   
                                阅读次数:
186
                             
                         
                    
                        
                            
                            
                                Bird Combines Calls in Specific Order
鸟语也有顺序性
Humans have always considered themselves special compared with other animals. One reason is the complexity of our language—bounded by unique rules, ...
                            
                            
                                分类:
其他好文   时间:
2016-04-22 20:32:25   
                                阅读次数:
266
                             
                         
                    
                        
                            
                            
                                一天一道LeetCode系列(一)题目
  Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
(二)解题合并K个已拍好序的链表。剑指上有合并两个已排好序的链表的算法,那么K个数,我们可以采用归并排序的思想,不过合并函数可能需要修改一下,换成合并两个已排好...
                            
                            
                                分类:
其他好文   时间:
2016-04-22 20:07:31   
                                阅读次数:
142
                             
                         
                    
                        
                            
                            
                                Sort a linked list in O(n log n) time using constant space complexity. 排序问题是我们遇到的一个老问题,从大一开始我们就学习了各种排序算法,大部分是基于数组的,比如冒泡排序,插入排序,快速排序等。这其中冒泡排序,插入排序的算法复杂 ...
                            
                            
                                分类:
其他好文   时间:
2016-04-22 10:33:57   
                                阅读次数:
176
                             
                         
                    
                        
                            
                            
                                    Step 1: Use the key to find this node in BST, time complexity is log(n) Step 2: after finding this node, we have 3 different conditions: 1, if this no ...
                            
                            
                                分类:
其他好文   时间:
2016-04-21 18:34:53   
                                阅读次数:
172
                             
                         
                    
                        
                            
                            
                                There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh ...
                            
                            
                                分类:
其他好文   时间:
2016-04-18 13:15:00   
                                阅读次数:
207