Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Not...
分类:
其他好文 时间:
2015-06-14 16:28:17
阅读次数:
79
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No...
分类:
其他好文 时间:
2015-06-14 16:24:41
阅读次数:
112
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space. Y...
分类:
其他好文 时间:
2015-06-14 09:32:09
阅读次数:
144
Excel Sheet Column NumberRelated to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column ...
分类:
编程语言 时间:
2015-06-14 08:14:25
阅读次数:
154
Excel Sheet Column TitleGiven a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B ...
分类:
编程语言 时间:
2015-06-14 08:11:21
阅读次数:
220
Find Peak ElementA peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and ...
分类:
编程语言 时间:
2015-06-14 06:59:21
阅读次数:
127
Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alternate between).For example:
Given binary tree...
分类:
其他好文 时间:
2015-06-13 14:20:17
阅读次数:
121
题目链接 题目要求: Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top r...
分类:
其他好文 时间:
2015-06-13 14:03:18
阅读次数:
109
Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root).For example:
Given binary tree {3,9,20,#,#,15,7}, 3...
分类:
其他好文 时间:
2015-06-13 12:57:50
阅读次数:
98
Given a binary tree, return the preorder traversal of its nodes’ values.For example:
Given binary tree{1,#,2,3}, 1
2
/
3return [1,2,3].递归遍历:/**C++
* Definition for a binary tree n...
分类:
其他好文 时间:
2015-06-13 11:27:51
阅读次数:
143