码迷,mamicode.com
首页 > 其他好文
[leetcode] Binary Search Tree
题目:(Tree Stack)Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will ...
分类:其他好文   时间:2015-01-01 00:04:55    阅读次数:231
应用管理的实现
1 1、加载应用信息: 2 1.1、直接在controller里进行懒加载:(get方法) 3 1.1.1、先判断是否已经加载数据:if (array == nil) 4 1.1.2、先找到plist文件的路径:NSString *path = [[NSBundle mai...
分类:其他好文   时间:2015-01-01 00:03:55    阅读次数:298
[leetcode]Min Stack
老题目。两个栈。class MinStack { stack stk; stack minstk;public: void push(int x) { stk.push(x); if (minstk.empty() || minstk.top() >= ...
分类:其他好文   时间:2015-01-01 00:04:51    阅读次数:179
[leetcode]Fraction to Recurring Decimal
各种情况。有恶心的负数最值,用long long来做了。除此之外的情况下面都列出来了。/*1, 8 = 0.1251, 6 = 0.1(6)-50, 6 = -6.250, -3 = 0-1, -2147483648 = "0.0000000004656612873077392578125"*/ty...
分类:其他好文   时间:2015-01-01 00:02:23    阅读次数:168
[leetcode]Compare Version Numbers
本人的做法是转化成vector再处理,各种情况就比较简单了。class Solution {public: int compareVersion(string version1, string version2) { vector v1 = convert(version1); ...
分类:其他好文   时间:2015-01-01 00:03:30    阅读次数:192
全错位排列
全错位排列的介绍及其代码与算法题
分类:其他好文   时间:2015-01-01 00:02:23    阅读次数:220
codeforces 500A. New Year Transportation
题目链接:http://codeforces.com/problemset/problem/500/A题目意思:给出 n-1 个 cell,每个 cell 有一个值 ai,表示在这个编号为 i 的 cell,能到达i + ai 的cell,但不能反过来,即从 i+ai 到达i 这个 cell。问从第...
分类:其他好文   时间:2015-01-01 00:02:02    阅读次数:278
奔跑吧兄弟活动客服是多少√☆→
如收到中奖信息请拨打总部唯一电话:【O1O-5659-1895】,颁奖部门负责人王经理专线:【O1O-5659-1895】。【活动官方公告】安全认证/总部唯一受理电话【O1O-5659-1895】 场外活动专线确认请拨打经理电话:【O1O-5659-1895】 唯一颁奖活动查实专线必须通唯一电话确认...
分类:其他好文   时间:2015-01-01 00:03:19    阅读次数:164
[leetcode]Majority Element
黑帮火并简单版。多个数的有另一篇文章。class Solution {public: int majorityElement(vector &num) { int size = num.size(); int major = 0; int count ...
分类:其他好文   时间:2015-01-01 00:02:19    阅读次数:220
WCF创建简单程序
1. 新建立空白解决方案,并在解决方案中新建项目,项目类型为:WCF服务应用程序。建立完成后如下图所示: 2.删除系统生成的两个文件IService1.cs与Service1.svc,当然你也可以直接在这两个自动生成的文件中编码。 3.添加自定义的WCF【服务文件】User.svc,此时vs20.....
分类:其他好文   时间:2015-01-01 00:01:58    阅读次数:240
[leetcode]Find Minimum in Rotated Sorted Array II
二分,各种情况。class Solution {public: int findMin(vector &num) { int size = num.size(); int minVal = num[size-1]; findMinRe(num, 0, ...
分类:其他好文   时间:2015-01-01 00:00:40    阅读次数:218
2014最后一天,好烦!这个问题从来没遇到过!网上查找了很多办法都没解决!并且no wifi 了!
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.entity.user.Us...
分类:其他好文   时间:2015-01-01 00:03:16    阅读次数:373
[整理]当前日期的加减运算
在DateUtils(d7)里,有如下几个现成的函数 function IncYear(const AValue: TDateTime; const ANumberOfYears: Integer = 1): TDateTime; // function IncMonth is in SysUtil...
分类:其他好文   时间:2015-01-01 00:02:44    阅读次数:372
LintCode-Longest Common Substring
Given two strings, find the longest common substring.Return the length of it.NoteThe characters in substring should occur continiously in original str...
分类:其他好文   时间:2015-01-01 00:01:16    阅读次数:339
Xcode的常用快捷键
在开发中,使用快捷键就像玩游戏时用的大招,这么爽的东西你能不用吗?各种新建shift + comand + n 新建项目option + command + n 新建分组command + n 新建文件搜索shift + command + o command + f控制tabcommand + t...
分类:其他好文   时间:2014-12-31 23:59:43    阅读次数:431
递归和迭代的区别
递归的基本概念:程序调用自身的编程技巧称为递归,是函数自己调用自己.一个函数在其定义中直接或间接调用自身的一种方法,它通常把一个大型的复杂的问题转化为一个与原问题相似的规模较小的问题来解决,可以极大的减少代码量.递归的能力在于用有限的语句来定义对象的无限集合.使用递归要注意的有两点:1)递归就是在过...
分类:其他好文   时间:2015-01-01 00:01:11    阅读次数:428
送别2014 喜迎2015
一转眼2014年就过去了,仿佛好多事情就发生在昨天一样,曾经一个多月时间的住院,手术后留下的疤痕永远也抹不去了。真希望以后再也不要这样,好的身体真的比什么都重要。 6月份从道富回公司另一个项目组,项目组的改变也意味着新业务和技术的改变,还好使用的平台是.net,只是具体用的.net技术不一样而...
分类:其他好文   时间:2015-01-01 00:00:01    阅读次数:423
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!