摘要:
题目Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution...
阅读全文
posted @ 2015-09-26 19:57
Coding菌
阅读(151)
推荐(0)
摘要:
题目Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the ...
阅读全文
posted @ 2015-09-26 19:21
Coding菌
阅读(103)
推荐(0)
摘要:
序言最近了解各大互联网公司的校招要求,发现了解Boost程序库也是不可或缺的一部分~于是,决定潜心研究下,这个准标准库~首先,在官网下载boost的最新版本Boost 1.59.0 ,这是当前的最新版本。下面详细给出,VS2013环境下配置boost的详细步骤!Boost编译预处理...
阅读全文
posted @ 2015-09-26 11:28
Coding菌
阅读(2286)
推荐(0)
摘要:
题目The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the...
阅读全文
posted @ 2015-09-23 21:11
Coding菌
阅读(266)
推荐(0)
摘要:
题目Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should pre...
阅读全文
posted @ 2015-09-23 20:07
Coding菌
阅读(123)
推荐(0)
摘要:
题目Given a sorted linked list, delete all duplicates such that each element appear only once.For example, Given 1->1->2, return 1->2. Given 1-...
阅读全文
posted @ 2015-09-22 21:33
Coding菌
阅读(131)
推荐(0)
摘要:
题目Follow up for “Search in Rotated Sorted Array”: What if duplicates are allowed?Would this affect the run-time complexity? How and why?Write...
阅读全文
posted @ 2015-09-22 20:07
Coding菌
阅读(138)
推荐(0)
摘要:
题目一天之内股票价格变动n次,只能进行最多两次股票买卖,而且必须完成一次才能进行下一次买卖,也就是说只能 买—>卖 —>买—>卖 ;给出一天内 股票的售价,设计如何买卖能够获得最大收益,给出最大收益;输入://第一行,一天能股票的价格种类 6 //第二行,给出价格数 10 22 ...
阅读全文
posted @ 2015-09-19 15:27
Coding菌
阅读(160)
推荐(0)
摘要:
题目听同学叙述了,15年研发岗的笔试 程序题,记录如下,备用~第一题是要求按逆对角线方式输出二维矩阵元素: //输入 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 //输出 ...
阅读全文
posted @ 2015-09-19 15:19
Coding菌
阅读(268)
推荐(0)
摘要:
题目猴子分苹果问题:有一堆苹果,N只猴子来分,第一只猴子将苹果分为N份,多一个,扔掉,猴子取出其中一份; 第二只猴子,将此时的苹果,同样分为N分,多一个,扔掉,取出其中一份; ….第三只,四只…N只猴子同样处理;问满足题意的这一堆苹果的最少有几个?输入: N(第一行)输出:最初苹果...
阅读全文
posted @ 2015-09-18 21:47
Coding菌
阅读(130)
推荐(0)