树的层次遍历,比较简单,3个题的做法完全一样,只是在特定的地方对结果进行reverse。1、Binary Tree Level Order Traversal/** * Definition for binary tree * struct TreeNode { * int val; * ...
分类:
其他好文 时间:
2014-07-07 16:39:56
阅读次数:
194
Problem Description:Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integ...
分类:
其他好文 时间:
2014-06-30 14:32:54
阅读次数:
151
#includeusing namespace std;class Node{public: Node(int value) : value(value), next(NULL) {}public: int value; Node* next;};Node* reverseList...
分类:
编程语言 时间:
2014-06-27 20:02:00
阅读次数:
253
----------------------首先介绍charindex函数----------------------------- CHARINDEX函数返回字符或者字符串在另一个字符串中的起始位置。 CHARINDEX函数调用方法如下:CHARINDEX ( expression1 , expr...
分类:
数据库 时间:
2014-06-27 16:58:17
阅读次数:
207
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
分类:
其他好文 时间:
2014-06-27 12:48:46
阅读次数:
259
Reverse digits of an integer.
分类:
其他好文 时间:
2014-06-27 12:41:43
阅读次数:
211
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:
其他好文 时间:
2014-06-27 12:21:24
阅读次数:
215
题目:输入一个英文句子,翻转句子中单词的顺序,但单词内字符顺序不变题解分析:两次翻转:第一次翻转整个句子第二次解析出每个单词并将单词翻转void reverse(char* first, char* last){ assert(first != NULL && last != NULL); ...
分类:
其他好文 时间:
2014-06-27 12:04:29
阅读次数:
174
题目:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a sing...
分类:
其他好文 时间:
2014-06-27 11:38:12
阅读次数:
207
非原创,原文链接:http://blog.csdn.net/shuchao/article/details/3705252 调用reverse_iterator的base成员函数可以产生"对应的"iterator,但这句话有些辞不达意。举个例子,看一下这段代码,我们首先把从数字1-5放进一个ve.....
分类:
其他好文 时间:
2014-06-26 20:07:59
阅读次数:
166