题目一:
Given a binary tree containing digits from 0-9 only, each root-to-leaf
path could represent a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Fin...
分类:
其他好文 时间:
2014-05-26 04:06:41
阅读次数:
248
从今天开始Mayuyu要学习QT了,Mayuyu是一个很爱美的姑娘,所以为了能给设计出美观的图形界面,Mayuyu一定
会努力的!
今天Mayuyu要讲的是布局管理中的分割窗口类QSplitter,分割窗口,顾名思义就是把窗口分割成一个一个小块。
比如要实现一个简单的窗口,如下图:
这个窗体有3部分,那么写出如下代码:
#include "widget.h"
#in...
分类:
其他好文 时间:
2014-05-26 04:04:32
阅读次数:
330
【题目】
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
For example,
Given the following matrix:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
You should return [1,2,3,6,9,8,7,4,5].
【题意】
螺旋输出MxN...
分类:
其他好文 时间:
2014-05-24 23:11:02
阅读次数:
279
【题目】
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [?2,1,?3,4,?1,2,1,?5,4],
the contiguous subarray [4,?1,2,1] has the largest sum = 6.
【题意】
给定一个数组,找出和最大的子数组,返回...
分类:
其他好文 时间:
2014-05-24 22:19:17
阅读次数:
260
【题目】
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Determine if you are able to reach the last index.
For example:...
分类:
其他好文 时间:
2014-05-24 20:44:39
阅读次数:
221
本人觉得有了这个更新,Qt Creator可谓几乎没有缺点了,起码仅仅开发C/C++,是不用再去安装VS了。Qt 5.3放出,更新无数,具体参考:http://qt-project.org/wiki/New-Features-in-Qt-5.3有一个功能,属于超级好的改进了,就是C++控制台程序的输出,不再是弹出一个CMD,执行程序,而是直接在应用程序输出结果:这个修改,让我振奋不已,以前弹出CM...
分类:
编程语言 时间:
2014-05-24 19:35:37
阅读次数:
411
【题目】
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
For example:
Input: ["tea","and","ate","eat","den"]
Output: ["tea","ate","eat"]
【题意】
anagrams指的是颠倒字母顺序构成的单词,以tea为例,则与它an...
分类:
其他好文 时间:
2014-05-24 18:36:01
阅读次数:
317
Palindrome Partitioning
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 = "...
分类:
其他好文 时间:
2014-05-24 14:29:45
阅读次数:
222
【题目】
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Given a collection of intervals, merge all overlapping intervals.
For example,
Given [1,3],[2,6],[8,10],[15,18],
return [1,6],[8,10],[15,18].
...
分类:
其他好文 时间:
2014-05-24 14:18:27
阅读次数:
193
sort 1 sort — 对数组排序
本函数对数组进行排序。当本函数结束时数组单元将被从最低到最高重新安排。 2 Example #1 sort() 例子 $val ){echo "fruits["
. $key . "]=" . $val . "\n" ;} ?>...
分类:
其他好文 时间:
2014-05-24 09:28:02
阅读次数:
216