对于地址转换函数,BSD网络软件包含inet_addr(), inet_aton()和inet_ntoa()三个函数用于二进制地址格式与点分十进制之间的相互转换,但是仅仅适用于IPv4,两个新函数inet_ntop()和inet_pton()具有相似的功能,并且同时支持IPv4和IPv6。
LeetCode Tree II
本文包含如下题目:
114. Flatten Binary Tree to Linked List
116. Populating Next Right Pointers in Each Node
117. Populating Next Right Pointers in Each Node II
124. Binary Tree Maximum Path Sum
129. Sum Root to Leaf Numbers
144. Binary Tree Preorder Traversal
145. Binary Tree Postorder Traversal
173. Binary Search Tree Iterator
199. Binary Tree Right Side View
222. Count Complete Tree Nodes
226. Invert Binary Tree
230. Kth Smallest Element in a BST
235. Lowest Common Ancestor of a Binary Search Tree
236. Lowest Common Ancestor of a Binary Tree
257. Binary Tree Paths
297. Serialize and Deserialize Binary Tree
337. House Robber III
404. Sum of Left Leaves
449. Serialize and Deserialize BST
450. Delete Node in a BST
LeetCode Tree I
本文包含的题目有:
94. Binary Tree Inorder Traversal
95. Unique Binary Search Trees II
96. Unique Binary Search Trees
98. Validate Binary Search Tree
99. Recover Binary Search Tree
100. Same Tree
101. Symmetric Tree
102. Binary Tree Level Order Traversal
103. Binary Tree Zigzag Level Order Traversal
104. Maximum Depth of Binary Tree
105. Construct Binary Tree from Preorder and Inorder Traversal
106. Construct Binary Tree from Inorder and Postorder Traversal
107. Binary Tree Level Order Traversal II
108. Convert Sorted Array to Binary Search Tree
110. Balanced Binary Tree
111. Minimum Depth of Binary Tree
112. Path Sum
113. Path Sum II
437. Path Sum III
Ubuntu14.04系统Chromium安装Adobe Flash插件
经历了好几次重装Ubuntu系统,每次安装都需要配置一大堆东西,对于一个几乎放弃了windows系统的人来说,每次重装系统的第一件事就是安装一个Chromium浏览器,谁让我的所有收藏夹都在Chromium账号中。然而每次安装Chromium的Flash插件都需要去网上查找各种教程,每次都要搞好久才能弄好,这次专门记录一下,以便以后需要时用到。
LeetCode LinkList
本文包含如下题目:
2. Add Two Numbers
19. Remove Nth Node From End of List
21. Merge Two Sorted Lists
23. Merge k Sorted Lists
24. Swap Nodes in Pairs
25. Reverse Nodes in k-Group
61. Rotate List
82. Remove Duplicates from Sorted List II
83. Remove Duplicates from Sorted List
86. Partition List
92. Reverse Linked List II
109. Convert Sorted List to Binary Search Tree
138. Copy List with Random Pointer
141. Linked List Cycle
142. Linked List Cycle II
143. Reorder List
160. Intersection of Two Linked Lists
203. Remove Linked List Elements
206. Reverse Linked List
234. Palindrome Linked List
237. Delete Node in a Linked List
328. Odd Even Linked List
445. Add Two Numbers II
归并排序的实现与深入应用分析
归并排序是我们经常使用的一种排序方法,其特性为:
最差时间复杂度:O(nlogn)
平均时间复杂度:O(nlogn)
最差空间复杂度:O(n)
稳定性:稳定
本文主要介绍在LeetCode中用到归并排序的两道例题,详细展示一下归并排序的强大应用;
LeetCode Bit Manipulation I
本文包含如下题目:
78. Subsets
136. Single Number
137. Single Number II
169. Majority Element
187. Repeated DNA Sequences
190. Reverse Bits
191. Number of 1 Bits
201. Bitwise AND of Numbers Range
231. Power of Two
260. Single Number III
268. Missing Number
318. Maximum Product of Word Lengths
338. Counting Bits