码迷,mamicode.com
首页 > 其他好文
Leetcode 树 Binary Tree Preorder Traversal
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Binary Tree Preorder Traversal  Total Accepted: 17948 Total Submissions: 51578 Given a binary tree, return the preorder tra...
分类:其他好文   时间:2014-05-15 04:37:26    阅读次数:283
【LeetCode】Search a 2D Matrix
题目 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right.The first integer...
分类:其他好文   时间:2014-05-15 03:41:11    阅读次数:257
leetcode题目:Palindrome Partitioning 和Palindrome Partitioning II
题目一: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ...
分类:其他好文   时间:2014-05-14 15:10:01    阅读次数:293
【Unity3D游戏开发】—— PlayerPrefs类实现本地持久化数据存储
在很多游戏中都会有“存储进度”,“读取进度”等菜单,或者当我们进入下一个场景时有些数据需要带入下一个场景。这就需要数据储存。Unity中提供了一个用于本地持久化保存于读取数据的类——PlayerPrefs。 它是以键值对的形式将数据保存在文件中。 下面来看看PlayerPrefs的简单用法。、 //得到存储的数据 Grade = PlayerPref...
分类:其他好文   时间:2014-05-14 14:21:51    阅读次数:311
cocos2dx--vs2012+lua开发环境搭建
cocos2dx--vs2012+lua开发环境搭建...
分类:其他好文   时间:2014-05-15 15:16:28    阅读次数:324
ZOJ 3640 Help Me Escape
OJ题目:click here~~ 题目分析:有n条路径逃出洞穴,第i条路径有一个难度值ci。某人开始有战斗值f,每天随机选择某一条路径想要逃出。只要此时的 f 大于所选路径的ci,就能花费ti的天数逃出。这里。否则,等待明天再试吧,但是战斗值能增加ci。求逃出的期望天数。 设dp[ i ] 为战斗值为i时,逃出的期望天数。详细解释见代码。 AC_CODE int const maxn =...
分类:其他好文   时间:2014-05-15 06:38:40    阅读次数:406
用minGW编译ffmpeg(供替换opencv中引用的ffmpeg库)
在安装好的opencv目录下找到路径:opencv245\opencv\3rdparty\ffmpeg,此路径下有一个readme.txt文件。 根据此文件中的步骤采用minGW对ffmpeg进行编译,详细介绍请见该文章。...
分类:其他好文   时间:2014-05-15 03:27:35    阅读次数:325
VBA从字符串中取出数据信息的函数
作者:iamlaosong 一个简单的函数,从包含有数字信息的字符串中取出这个数据,利用VAL函数将字符串转换为数值,该函数或略数字字符串后面的字母和汉字信息,所以,只要把数字前面的字母和汉字信息去掉就行了。  '函数,从字符串“ABC123456.78DEF”中取出数据 Function mydata(mystring As String) As Double     Dim...
分类:其他好文   时间:2014-05-15 11:16:23    阅读次数:448
LeetCode-004 Add Two Numbers
【题目】 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 digit. Add the two numbers and return it as a linked list. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Out...
分类:其他好文   时间:2014-05-15 05:13:49    阅读次数:306
[记忆化搜索] zoj 3681 E - Cup 2
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3681 E - Cup 2 Time Limit: 2 Seconds      Memory Limit: 65536 KB The European Cup final is coming. The past two World C...
分类:其他好文   时间:2014-05-15 14:56:27    阅读次数:393
Hive常用命令
创建表: hive> CREATE TABLE pokes (foo INT, bar STRING);          Creates a table called pokes with two columns, the first being an integer and the other a string 创建一个新表,结构与其他一样 hive> create table n...
分类:其他好文   时间:2014-05-15 07:07:58    阅读次数:303
惊天发现之"c#中的Main函数不能调同一个类中的非静态方法"
这是什么原因呢?求大神指点!...
分类:其他好文   时间:2014-05-15 06:20:27    阅读次数:182
Leetcode 树 Binary Tree Level Order Traversal
题意:给定一棵二叉树,返回按层遍历的结果 思路1:bfs,定义一个新的struct,记录指针向节点的指针和每个节点所在的层 复杂度1:时间O(n),空间O(n) 思路2:dfs 递归函数: void levelOrder(TreeNode *root, int level, vector<vector >&result) 表示把根为root的树按层存放在result中,其中level表示当前的层数 复杂度2:时间O(n),空间O(n) 相关题目:...
分类:其他好文   时间:2014-05-15 14:46:06    阅读次数:355
COM/DCOM开发练习之进程内组件实例
COM/DCOM开发练习之进程内组件实例...
分类:其他好文   时间:2014-05-15 04:36:49    阅读次数:340
我身边的单片机
没接触单片机前,偶尔听过感觉和我距离好远。后来了解后,发现单片机真的不可或缺啊!这里我将说说我身边的单片机。...
分类:其他好文   时间:2014-05-14 14:49:24    阅读次数:348
NYOJ206 矩形的个数 【数学】
矩形的个数 时间限制:1000 ms  |  内存限制:65535 KB 难度:1 描述在一个3*2的矩形中,可以找到6个1*1的矩形,4个2*1的矩形3个1*2的矩形,2个2*2的矩形,2个3*1的矩形和1个3*2的矩形,总共18个矩形。 给出A,B,计算可以从中找到多少个矩形。 输入本题有多组输入数据( 输入2个整数A,B(1 输出输出...
分类:其他好文   时间:2014-05-14 15:09:01    阅读次数:237
CSDN排名第一和第二的人
http://blog.csdn.net/phphot...
分类:其他好文   时间:2014-05-15 05:26:11    阅读次数:187
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!