树的层次遍历,比较简单,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:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Solution: ...
分类:
其他好文 时间:
2014-07-07 16:39:19
阅读次数:
163
方法说明Concat()连接2个或多个数组,并返回结果Push()向数组末尾添加一个或多个元素,并返回新的长度Reverse()颠倒数组中元素的顺序Sort()对数组的元素进行排序Slice()从某个已有的数组返回数组选定的元素toString()把数组转换成字符串Join()连接toLoc...
分类:
其他好文 时间:
2014-07-02 00:29:20
阅读次数:
295
反向数据库File - Reverse - Database - DBMS - Using a data source改变数据库Database - Change Current -DBMS生成数据脚本Database -Generate Databse
分类:
其他好文 时间:
2014-07-01 21:20:34
阅读次数:
215
IIS 6.0和IIS 7.0 支持安装BITS上传组件。 下面以IIS7.0为例安装配置bits上传服务。1.安装首先确定服务器已经按装IIS服务。依次打开服务管理器->功能->添加功能, 选择BITS服务扩展,添加必要的服务后点击确定。等待BITS安装完成。打开IIS管理器后选择一个网站,可以在...
分类:
其他好文 时间:
2014-07-01 12:47:23
阅读次数:
215
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:
其他好文 时间:
2014-06-30 23:46:14
阅读次数:
288
题意:给出n个二进制串,可以把其中的一些0和1反转(即0变1,1变0),找出转化后n个串中的最大值和最小值的差值。
分析:思路就是把所有的串和反转的存在一个数组中,然后排序,找最大值和最小值的差,(如果是同一个串反转的就找第二大的和最小的或第二小和最大的中的最大值)。注意假如只有一个串的话结果为0
DEBUG:
这题写了好久
1.第一次用vim,很爽,但是还没熟练
2.忽...
分类:
移动开发 时间:
2014-06-30 19:19:10
阅读次数:
254
class Solution {public: ListNode *reverseBetween(ListNode *head, int m, int n) { if (head == NULL || n 0) { pre = cur; ...
分类:
其他好文 时间:
2014-06-30 15:36:26
阅读次数:
148
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
前言:汇编语言,对下取决于体系结构;对上取决于汇编器。在linux下,GCC编译出来的汇编默认为ATT语法的汇编,本文主要介绍ATT汇编:操作数长度、立即数表示方法,寄存器引用,操作数顺序,符号常量,内存引用等。
1,操作数的长度
操作数的长度用加在指令后的符号表示 b(byte, 8-bit), w(word, 16-bits), l(long, 32-...
分类:
其他好文 时间:
2014-06-27 10:44:54
阅读次数:
800