练手题,看了一圈感觉思路都很清楚,也许会有corner case的问题,拿这些题目练练手:
80. Remove Duplicates from Sorted Array II
82. Remove Duplicates from Sorted List II *
91. Decode Ways
93. Restore IP Addresses
106. Construct Binary Tree from Inorder and Postorder Traversal
109. Convert Sorted List to Binary Search Tree *
114. Flatten Binary Tree to Linked List * iterative的写法
117. Populating Next Right Pointers in Each Node II
127. Word Ladder
131. Palindrome Partitioning
137. Single Number II
144. Binary Tree Preorder Traversal
网友评论