题目:Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.说明: 1)二叉树可.....
分类:
其他好文 时间:
2014-07-11 21:07:27
阅读次数:
273
题目:Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.说明: 1)实现与.....
分类:
其他好文 时间:
2014-07-11 20:40:38
阅读次数:
198
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100"class Solution {public: string addBinary(stri...
分类:
其他好文 时间:
2014-07-11 20:05:47
阅读次数:
224
最近在研究登陆密码的加密,下边上具体代码,只是给出核心代码,具体的代码视业务而定吧,给位有什么问题或者意见请留言。加密方法用的是AES-128-CBC,BASE64用的是org.apache.commons.codec.binary.Base64JS代码:var password = "123456...
分类:
编程语言 时间:
2014-07-11 19:30:48
阅读次数:
606
Bug产生原因:块里面有换行的元素.CSS:.left{float:left;width:100px;background:#fff000;}.right{float:right;width:100px;background:#ff0000;}HTML:左边中间右边ie6显示跳到右边的下一行里面解决...
分类:
其他好文 时间:
2014-07-11 11:04:04
阅读次数:
189
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; ...
分类:
其他好文 时间:
2014-07-11 08:58:23
阅读次数:
207
题目链接:uva 10548 - Find the Right Changes
题目大意:给定A,B,C,求x,y,使得xA+yB=C,求有多少种解。
解题思路:拓展欧几里得,保证x,y均大于等于0,确定通解中t的取值。
#include
#include
#include
#include
using namespace std;
typedef long long ll...
分类:
其他好文 时间:
2014-07-11 00:03:25
阅读次数:
165
疯狂的暑假学习之 汇编入门学习笔记 (七)—— dp,div,dup
参考: 《汇编语言》 王爽 第8章
1. bx、si、di、和 bp
8086CPU只有4个寄存器可以用 “[...]” 中进行单元寻址。
bp:除了默认的段地址是ss,其他与bx一样。
它们所有正确的组合
mov ax,[bx]
mov ax,[si]
mov ax,[di]
mov ax,[dp]
mov ax,[bx+si]
mov ax,[bx+di]
mov ax,[bp+si]
mov ax,[bp+di]
mo...
分类:
其他好文 时间:
2014-07-10 22:15:57
阅读次数:
356
We all know how to search through an array for an element whose value equals the target value, but how to search for the element that has value greate...
分类:
其他好文 时间:
2014-07-10 16:08:21
阅读次数:
168
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.思路:递归。主要是注意调用时起...
分类:
其他好文 时间:
2014-07-10 14:40:07
阅读次数:
196