Given a binary tree, flatten it to a linked list in-place. For example, given the following tree: 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look ...
                            
                            
                                分类:
其他好文   时间:
2019-02-26 00:48:34   
                                阅读次数:
254
                             
                         
                    
                        
                            
                            
                                    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  ...
                            
                            
                                分类:
其他好文   时间:
2019-02-23 10:19:25   
                                阅读次数:
193
                             
                         
                    
                        
                            
                            
                                    [TOC] LeetCode 单链表专题 $[2]$ Add Two Numbers 模拟,注意最后判断进位是否为1。 时间复杂度 $O(n)$ $[92]$ Reverse Linked List II 给定链表,翻转第m个结点到第n个结点。 从第m+1个结点开始,在第m 1个结点之后的位置用 头 ...
                            
                            
                                分类:
其他好文   时间:
2019-02-23 01:32:44   
                                阅读次数:
231
                             
                         
                    
                        
                            
                            
                                Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked list, we use an integer pos which represents the posi ...
                            
                            
                                分类:
其他好文   时间:
2019-02-22 18:14:04   
                                阅读次数:
148
                             
                         
                    
                        
                            
                            
                                    https://leetcode.com/problems/reverse-linked-list-ii/ Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. ...
                            
                            
                                分类:
其他好文   时间:
2019-02-20 21:41:21   
                                阅读次数:
179
                             
                         
                    
                        
                            
                            
                                Given a linked list, remove the n-th node from the end of list and return its head. Example: Given linked list: 1->2->3->4->5, and n = 2. After removi ...
                            
                            
                                分类:
其他好文   时间:
2019-02-20 20:05:36   
                                阅读次数:
185
                             
                         
                    
                        
                            
                            
                                    19. Remove Nth Node From End of List Given a linked list, remove the n-th node from the end of list and return its head. Example: ...
                            
                            
                                分类:
Web程序   时间:
2019-02-16 13:35:00   
                                阅读次数:
191
                             
                         
                    
                        
                            
                            
                                    25. Reverse Nodes in k-Group Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer ...
                            
                            
                                分类:
Web程序   时间:
2019-02-16 13:32:52   
                                阅读次数:
205
                             
                         
                    
                        
                            
                            
                                    24. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. You may not modify the values in the list's nodes, onl ...
                            
                            
                                分类:
Web程序   时间:
2019-02-16 13:20:04   
                                阅读次数:
157
                             
                         
                    
                        
                            
                            
                                "98. Sort List" / "148. Sort List" 本题难度: Medium Topic: Linked List Description Sort a linked list in O(n log n) time using constant space complexity.  ...
                            
                            
                                分类:
其他好文   时间:
2019-02-14 20:57:25   
                                阅读次数:
166