摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2018-01-04 12:43 YWU 阅读(143) 评论(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,-3,4,-1,2, 阅读全文
posted @ 2018-01-04 06:40 YWU 阅读(93) 评论(0) 推荐(0)
摘要: Implement int sqrt(int x). Compute and return the square root of x. x is guaranteed to be a non-negative integer. Example 1: Input: 4 Output: 2 Exampl 阅读全文
posted @ 2017-12-18 15:09 YWU 阅读(72) 评论(0) 推荐(0)
摘要: Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leadin 阅读全文
posted @ 2017-12-12 14:20 YWU 阅读(85) 评论(0) 推荐(0)
摘要: The count-and-say sequence is the sequence of integers with the first five terms as following: 1 is read off as "one 1" or 11.11 is read off as "two 1 阅读全文
posted @ 2017-12-12 08:22 YWU 阅读(100) 评论(0) 推荐(0)
摘要: 1. 重命名文件 (Windows 平台) 2. 复制文件到相应文件夹,并运行(Windows 平台) 3. 删除目录下指定文件外的所有文件 (Linux 平台) 4. 读取指定文件内的内容,并提取数据做出图形 以上运行结果见如下,.html文件: <!DOCTYPE HTML PUBLIC "-/ 阅读全文
posted @ 2017-12-08 13:25 YWU 阅读(466) 评论(0) 推荐(0)
摘要: Step One: Enable a host file in Windows by VMware settings. 1. 在VMware客户机的选项栏中选择 "Virtual Machine" -> "Virtual Machine Settings..." 2. 在弹出的窗口中,选择"opti 阅读全文
posted @ 2017-12-08 13:19 YWU 阅读(198) 评论(0) 推荐(0)
摘要: 进入vi的命令 vi filename :打开或新建文件,并将光标置于第一行首 vi +n filename :打开文件,并将光标置于第n行首 vi + filename :打开文件,并将光标置于最后一行首 vi +/pattern filename:打开文件,并将光标置于第一个与pattern匹配 阅读全文
posted @ 2017-12-08 12:09 YWU 阅读(110) 评论(0) 推荐(0)
摘要: Basic commonds: 1. Give the authority for execution chmod +x filename.sh 2. Look the content cat filename.sh 3. Create a new file and edit the content 阅读全文
posted @ 2017-12-08 12:02 YWU 阅读(190) 评论(0) 推荐(0)
摘要: 问: Python 计算 -7%4 + 1 与 1 - 7%4 二者计算结果相等吗? 答: 不等!前者结果为2,后者为-2。 对此,作如下两点解释: 1. 首先看一下Python计算的优先级,官方手册的截图如下(https://docs.python.org/2/reference/expressi 阅读全文
posted @ 2017-12-08 08:29 YWU 阅读(2641) 评论(0) 推荐(0)