1、首先,要有一张CentOS 6.4的安装介质,使用介质启动电脑出现如下界面界面说明:Install or upgrade an existing system 安装或升级现有的系统install system with basic video driver 安装过程中采用基本的显卡驱动Rescu...
分类:
其他好文 时间:
2014-08-06 14:09:31
阅读次数:
348
这个我就直接上代码了,最开始把“abc123“也算作合法的了,后来查了一下atoi的定义,把这种去掉了。
public class Solution {
public static int atoi(String inStr) {
long result = 0L;
/*
* 网上查了一下,atoi函数的定义是如果第一个非空格字符存在,是数字或者正负号则开始做类型转换,
*...
分类:
其他好文 时间:
2014-08-06 10:36:31
阅读次数:
193
2D DP is an intuitive solution of course, but I got an MLE error, so I simplified it into a 1D DP:class Solution {public: void goDp(vector &dp, int...
分类:
其他好文 时间:
2014-08-06 06:14:40
阅读次数:
196
Another list manipulation problem.class Solution {public: ListNode *reverseKGroup(ListNode *head, int k) { if (!head) return head; if...
分类:
其他好文 时间:
2014-08-06 06:14:10
阅读次数:
232
问题:将数组中的某个值为0的元素所在行和列的其他值都为0分析;遍历数组找到某一值为0然后遍历他的上下左右直到边界,要用while而不能用搜索,因为搜索过去新节点的操作以旧结点一样的操作 要用一个新数组,不然原数组修改后会影响到下次的查找class Solution {public: vo...
分类:
其他好文 时间:
2014-08-05 21:59:30
阅读次数:
176
今天想更新ubuntu到最新,听说有个命令,于是总结一下。通常会有、开发版、发行版之分:开发版:devel release (develop release)发行版:dist release(distribution release)版本升级:sudo do-release-upgrade 更新:u...
分类:
其他好文 时间:
2014-08-05 19:10:19
阅读次数:
195
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999. 1 public class Solution { 2 public int ...
分类:
其他好文 时间:
2014-08-05 11:02:09
阅读次数:
242
题目:Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space....
分类:
编程语言 时间:
2014-08-05 05:17:28
阅读次数:
265
Follow up for problem "Populating Next Right Pointers in Each Node".
What if the given tree could be any binary tree? Would your previous solution still work?
Note:
You may only use constant ...
分类:
其他好文 时间:
2014-08-05 00:51:38
阅读次数:
249
找出单词的最长公共前缀class Solution {public: string longestCommonPrefix(vector &strs) { int len=strs.size(); if(len==0) return ""; ...
分类:
其他好文 时间:
2014-08-05 00:09:58
阅读次数:
192