摘要: Description:Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are s... 阅读全文
posted @ 2015-06-17 19:06 Rosanne 阅读(205) 评论(0) 推荐(0) 编辑
摘要: Description:You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways c... 阅读全文
posted @ 2015-06-17 19:03 Rosanne 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 一.冒泡排序(稳定) 算法原理 1.首先比较第一个和第二个数据,将其中较小的数据放到第一个位置,较大的放到第二个位置。然后比较第二个和第三个位置,仍将较大的放到后一个位置。以此类推,直到比较第n-1个数据和第n个数据。这样就将待排序序列中的最大的一个放到第n个位置上,这个过程称为一趟排序。 2.对前 阅读全文
posted @ 2015-06-17 15:18 Rosanne 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 内部排序:全部待排序记录都可以同时调入内存进行的排序。 外部排序:待排序记录的数量太大,以致无法将其同时调入内存,尚需访问外存的排序过程。 排序中的基本操作: 1. 比较关键字大小 (对大多数排序算法是必须的) 2. 移动记录 (可通过改变记录的存储方式避免) 待排序记录的存储方式: 1. 存储在地 阅读全文
posted @ 2015-06-17 14:54 Rosanne 阅读(1067) 评论(0) 推荐(0) 编辑
摘要: Description:Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".Code: 1 string addBinary(string... 阅读全文
posted @ 2015-06-17 12:02 Rosanne 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Description:在Vmware Workstation 11上安装了Ubuntu 10.0,画面显示如下所示:Ubuntu系统的屏幕太小。调整方法:调节显示器分辨率即可,下图是将分辨率调节为1920*1080的结果。 阅读全文
posted @ 2015-06-17 09:06 Rosanne 阅读(8246) 评论(0) 推荐(0) 编辑