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

2015年9月14日

摘要: 题目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]... 阅读全文
posted @ 2015-09-14 19:13 Coding菌 阅读(108) 评论(0) 推荐(0) 编辑

2015年9月13日

摘要: 题目Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents ... 阅读全文
posted @ 2015-09-13 10:00 Coding菌 阅读(127) 评论(0) 推荐(0) 编辑

2015年9月12日

摘要: 题目Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents ... 阅读全文
posted @ 2015-09-12 20:01 Coding菌 阅读(151) 评论(0) 推荐(0) 编辑

2015年9月11日

摘要: 题目Total Accepted: 47928 Total Submissions: 148011 Difficulty: Medium Given a m x n grid filled with non-negative numbers, find a path from to... 阅读全文
posted @ 2015-09-11 21:44 Coding菌 阅读(95) 评论(0) 推荐(0) 编辑
 
摘要: 题目Follow up for “Unique Paths”:Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and em... 阅读全文
posted @ 2015-09-11 21:24 Coding菌 阅读(137) 评论(0) 推荐(0) 编辑
 
摘要: 题目A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or righ... 阅读全文
posted @ 2015-09-11 21:01 Coding菌 阅读(125) 评论(0) 推荐(0) 编辑
 
摘要: 题目蒙特卡罗算法的典型应用之一为求圆周率PI问题。思想:一个半径r=1的圆,其面积为:S=PI∗r2=PI/4一个边长r=1的正方形,其面积为:S=r2=1那么建立一个坐标系,如果均匀的向正方形内撒点,那么落入圆心在正方形中心,半径为1的圆内的点数与全部点数的比例应该为PI/4,根... 阅读全文
posted @ 2015-09-11 20:27 Coding菌 阅读(790) 评论(0) 推荐(0) 编辑
 
摘要: 序最近学习Unix网络编程,在第10章节,SCTP客户/服务器 程序实现时,发现很多由于系统没有安装sctp协议,引发的bug;因此,现将在CentOS上的sctp安装记录如下:安装如图(1)使用命令yum list lksctp* 查看需要安装列表(2)使用yum install... 阅读全文
posted @ 2015-09-11 17:06 Coding菌 阅读(743) 评论(0) 推荐(0) 编辑

2015年9月10日

摘要: 题目一个袋子里有30个银币,其中一枚是假币,并且假币和真币一模一样,肉眼很难分辨,目前只知道假币比真币重量轻一点。 请问,如何区分出假币?分析首先,分析一下寻找假币问题,采用递归分治的思想求解。首先为每个银币编号,然后将所有的银币等分为两份,放在天平的两边。这样就将区分30个银币的... 阅读全文
posted @ 2015-09-10 21:30 Coding菌 阅读(3175) 评论(0) 推荐(0) 编辑

2015年9月9日

摘要: 用GDB调试程序一GDB概述————GDB是GNU开源组织发布的一个强大的UNIX下的程序调试工具。或许,各位比较喜欢那种图形界面方式的,像VC、BCB等IDE的调试,但如果你是在UNIX平台下做软件,你会发现GDB这个调试工具有比VC、BCB的图形化调试器更强大的功能。所谓“寸有... 阅读全文
posted @ 2015-09-09 17:34 Coding菌 阅读(171) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 34 下一页