Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 1 /** 2 * Definition for binary tree 3 * public cl.....
分类:
其他好文 时间:
2014-09-26 13:49:58
阅读次数:
154
主要的思想类似中序遍历,先构建左子树,再构建当前节点,并构建右子树
TreeNode *sortedListToBST(ListNode *head) {
int count = 0;
ListNode * cur = head;
while (cur)
{
count++;
cu...
分类:
其他好文 时间:
2014-09-26 11:41:08
阅读次数:
230
参考:http://www.cnblogs.com/repository/archive/2011/01/18/1938418.htmlselect convert(varchar(10),c.[STARTSPECDAY],120), (select [LeaveName]+' ' ...
分类:
数据库 时间:
2014-09-25 18:42:17
阅读次数:
484
关于cer/pem证书转换,网上很多资料,我这就不说了,
网上有PHP实现的Push Notification,可以参考,
为了更好的做PUSH服务定制,我这里以Erlang(gen_server)实现iOS Push Notification...
分类:
移动开发 时间:
2014-09-24 23:28:28
阅读次数:
338
分类: Android高手进阶 Android基础教程 2012-09-14 18:10 29759人阅读 评论(35) 收藏 举报 android相册layoutobjectclassloaderencoding大家好,相信大家用的ListView控件一定很多的,是竖向滑动的,复用convert....
分类:
移动开发 时间:
2014-09-24 20:39:57
阅读次数:
425
Console.WriteLine("请输入天数"); int day = Convert.ToInt32(Console.ReadLine()); int d = day / 7; int d1 = day % 7; int sum = 0; int r = 0; sum = d * 28; f....
分类:
其他好文 时间:
2014-09-24 19:17:17
阅读次数:
203
使用 ImageMagick的convert命令进行image 2 pdf和pdf 2 image今天老婆的音乐教学事业有所突破,我当然要支持,所以帮老婆把她师弟发过来的吉他教学内容转成pdf文档,教学内容为100多张图片,很大的图片.最开始使用如下命令:convert -resize 50%x%5...
分类:
其他好文 时间:
2014-09-24 12:58:56
阅读次数:
201
1.打开IIS2.选择待操作的虚拟目录3.鼠标右键,点击"Convert to Application”4.点击connect as5.选中Specific user,并点击Set6.输入用户名密码并点击OK7.点击Test Settings进行测试8.测试通过,在"Add Application"...
分类:
移动开发 时间:
2014-09-24 11:59:06
阅读次数:
223
The argument of write has to be a string, so if we want to put other values in a file, we have to convert them to strings. The easiest way to do that ...
分类:
其他好文 时间:
2014-09-23 15:23:24
阅读次数:
171
Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.搜了一下,才知道这道题可以写这么简洁。 1 class ...
分类:
其他好文 时间:
2014-09-22 23:17:03
阅读次数:
195