
Data Structure
文章平均质量分 71
qq_34229391
xuezhayimei,xiquqianbeijingyan
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
二叉树的前中后序遍历(非递归)的多种方式
前序迭代遍历 前序遍历是先根后左再右,第一次接触到某个节点的时候就立即访问。 栈 刚开始的时候我们能接触到的只有根节点,然后我们将其值输出,然后访问它的左子女,因为我们对于一个节点只访问一次,所以我们访问完根节点之后就把根节点从栈中删除了,此时如果我们之前没有保存根节点的右子女,那么根节点右子女的信息变消失了,无法去访问,因为我们使用的是栈,后存入的先弹出,如果我们先存入左子女后存入右子...原创 2018-09-01 18:48:42 · 531 阅读 · 0 评论 -
332. Reconstruct Itinerary
Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tickets belong to a man who departs from JFK. Thus, ...原创 2018-09-09 10:28:02 · 170 阅读 · 0 评论 -
328. Odd Even Linked List
Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes. You should try to do it in p...原创 2018-09-06 14:14:32 · 272 阅读 · 0 评论