Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2014-07-24 10:04:33
阅读次数:
214
在qq等聊天软件中都有发送窗口抖动功能,现在在qt下实现该功能。用到的类主要有 QTimer 和 QPointQTimer 类的作用是启用定时器,在不同时刻使窗口处于不同位置,从而得到的效果就是窗口的抖动。 QPoint 类的作用是定位窗口的位置(坐标)。源代码如下://chardialog.h#i...
分类:
其他好文 时间:
2014-07-24 10:01:13
阅读次数:
224
Reverse Words in a StringGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click...
分类:
其他好文 时间:
2014-07-24 09:57:33
阅读次数:
179
题目:Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flatten...
分类:
编程语言 时间:
2014-07-24 09:55:43
阅读次数:
211
题目:Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2-....
分类:
编程语言 时间:
2014-07-24 09:53:16
阅读次数:
219
题目:Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->....
分类:
编程语言 时间:
2014-07-24 09:49:43
阅读次数:
204
最近几天都在学习 quick 找例子学习。 一直也没什么好的。 并且 还不会 lua 。学习学习 突突突官方文档上的打地鼠 都没了。 不知道为什么链接不好使。好吧 那么今天就先做一个简单的 例子 一步步的学习首先 创建 一个demo ---- hello World之后在 找一张图片放到res 目录...
分类:
其他好文 时间:
2014-07-24 09:46:33
阅读次数:
219
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example, Given [100, 4, 200, 1, 3, 2], The lo...
分类:
其他好文 时间:
2014-07-24 00:49:07
阅读次数:
200
Turn the pokers
大意:给出n次操作,给出m个扑克,然后给出n个操作的个数a[i],每个a[i]代表可以翻的扑克的个数,求最后可能出现的扑克的组合情况。
Hint
Sample Input:
3 3
3 2 3
For the this example:
0 express face down,1 express face up
Ini...
分类:
其他好文 时间:
2014-07-23 22:35:57
阅读次数:
254
Turn the pokers大意:给出n次操作,给出m个扑克,然后给出n个操作的个数a[i],每个a[i]代表可以翻的扑克的个数,求最后可能出现的扑克的组合情况。HintSample Input:3 3 3 2 3For the this example: 0 express face down,...
分类:
其他好文 时间:
2014-07-23 22:25:37
阅读次数:
473