小小程序媛  
得之坦然,失之淡然,顺其自然,争其必然
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 34 下一页

2015年9月9日

摘要: 序Linux 内核和许多其他自由软件以及开放源码应用程序都是用 C 语言编写并使用 GCC 编译的。编译C++程序编译、链接命令-c 只编译不里链接-o链接例:g++ file1 -c -o file1.og++ file2 -c -o file2.og++ file1.o fil... 阅读全文
posted @ 2015-09-09 11:31 Coding菌 阅读(8577) 评论(0) 推荐(3) 编辑

2015年9月8日

摘要: 题目如果一对两月大的兔子以后每个月都能生一对小兔子,而一对新生的兔子出生两个月后才可以生小兔子。也就是说,1月份出生,3月份才可以产仔。那么假定一年内没有产生兔子死亡事件,那么一年后共有多少对兔子?分析我们先来分析一下兔子产仔问题,逐月来看每月的兔子数量:第一个月: 1对 第二个月... 阅读全文
posted @ 2015-09-08 17:19 Coding菌 阅读(280) 评论(0) 推荐(0) 编辑
 
摘要: 题目今有鸡兔同笼,上有35头,下有94足,问鸡、兔各有几只?分析这个问题需要计算鸡的数量和兔的数量,可知均为0~35之间,最直接的思路就是使用穷举法逐个判断是否符合,从而搜索答案~代码#include #include using namespace std;//穷举算法,对鸡兔的... 阅读全文
posted @ 2015-09-08 17:03 Coding菌 阅读(163) 评论(0) 推荐(0) 编辑

2015年9月7日

摘要: 题目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 andk=2, return 4−>5−... 阅读全文
posted @ 2015-09-07 20:45 Coding菌 阅读(818) 评论(0) 推荐(0) 编辑
 
摘要: 题目The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order, We get the followi... 阅读全文
posted @ 2015-09-07 20:06 Coding菌 阅读(147) 评论(0) 推荐(0) 编辑

2015年9月6日

摘要: 题目Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example, Given n = 3,You should return t... 阅读全文
posted @ 2015-09-06 18:31 Coding菌 阅读(103) 评论(0) 推荐(0) 编辑

2015年9月5日

摘要: 题目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 ma... 阅读全文
posted @ 2015-09-05 21:28 Coding菌 阅读(136) 评论(0) 推荐(0) 编辑
 
摘要: 题目Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [−2,1,... 阅读全文
posted @ 2015-09-05 20:35 Coding菌 阅读(94) 评论(0) 推荐(0) 编辑
 
摘要: 序原文网址简单说,分布式是以缩短单个任务的执行时间来提升效率的,而集群则是通过提高单位时间内执行的任务数来提升效率。例如:如果一个任务由10个子任务组成,每个子任务单独执行需1小时,则在一台服务器上执行改任务需10小时。采用分布式方案,提供10台服务器,每台服务器只负责处理一个子任... 阅读全文
posted @ 2015-09-05 16:05 Coding菌 阅读(151) 评论(0) 推荐(0) 编辑

2015年9月1日

摘要: new创建类对象与直接定义的区别new创建对象的特点new创建类对象需要指针接收,一处初始化,多处使用new创建类对象使用完需delete销毁new创建对象直接使用堆空间,而局部不用new定义类对象则使用栈空间new对象指针用途广泛,比如作为函数返回值、函数参数等频繁调用场合并不适... 阅读全文
posted @ 2015-09-01 22:02 Coding菌 阅读(3025) 评论(0) 推荐(1) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 34 下一页