//#include
#include
#include
//using namespace std;
//const int MAXN=10;
//int Stack[MAXN];
stack s;
class Solution {
public:
int getNumber(int x)
{
//int lengthOfStack=0;...
分类:
其他好文 时间:
2014-05-10 04:45:29
阅读次数:
231
Developing SWT applications using EclipseWhile
SWT is integrated as part of the Eclipse plug-in API, for standalone application
development it is best...
分类:
移动开发 时间:
2014-05-10 03:15:38
阅读次数:
386
本文的部分内容整理自我对此问题的解答:命名 CSS 的类或 ID 时单词间如何连接? -
知乎 问题 CSS 类或 ID 命名时单词间连接通常有这几种写法:驼峰式: solutionTitle、solutionDetail用横杠连接:
solution-title、solution-detail.....
分类:
Web程序 时间:
2014-05-10 00:23:26
阅读次数:
433
原文链接:Netflix recommendations: beyond the 5
stars(Part 1),(Part 2)原文作者:Xavier Amatriainand Justin
Basilico翻译:大魁前言Nexflix是一家提供在线视频流媒体服务和DVD租赁业务的公司,也是著名的...
分类:
Web程序 时间:
2014-05-09 23:04:26
阅读次数:
2440
当hive在执行大数据量的统计查询语句时,经常会出现下面OOM错误,具体错误提示如下:
Possible error: Out of memory due to hash maps used in map-side aggregation.
Solution: Currently hive.map.aggr.hash.percentmemory is set to 0.5. Try set...
分类:
其他好文 时间:
2014-05-09 21:08:27
阅读次数:
366
翻转链表绝对是终点项目,应该掌握的,这道题要求的是翻转一个区间内的节点,做法其实很相似,只不过要注意判定开始是头的特殊情况,这样head要更新的,还有就是要把翻转之后的尾部下一个节点保存好,要么链表就断掉了。一趟就可以,遇到节点直接翻转,最后把整个翻转的链表再翻转一次,就实现了。
class Solution {
public:
ListNode *reverseBetween(List...
分类:
其他好文 时间:
2014-05-09 15:05:06
阅读次数:
225
Roman to IntegerInteger to
Roman这两题纯粹是模拟题,关键就是理解罗马计数,直接上代码吧class Solution {public: int romanToInt(string s)
{ int result = 0; for (...
分类:
其他好文 时间:
2014-05-09 09:46:36
阅读次数:
298
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()", "()(())", "()()...
分类:
其他好文 时间:
2014-05-09 02:29:07
阅读次数:
302
有了上面的教训,这道题就简单多了,什么时候该更新pre是明确的了,倒是有个细节,二叉搜索树中是不允许有相等节点的,所以题目的要求用黑体字标明了。写的时候注意就可以了。
class Solution {
public:
TreeNode *pre = NULL;
bool isValidBST(TreeNode *root) {
if(root == NULL) ...
分类:
其他好文 时间:
2014-05-09 01:33:43
阅读次数:
269
本文翻译自http://devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-4-customizing-adt/在前面的文章中,我讲述了如何创建定制的original-android.jar和创建定制的android平台以...
分类:
移动开发 时间:
2014-05-08 22:51:15
阅读次数:
483