摘要: 一.sed编辑器 shell脚本最常见的用途就是处理文本文件,sed和gawk能够极大的简化需要进行的数据处理任务。sed编辑器是流编辑器,跟普通交互式文本编辑器(如vim)不同。流编辑器在编辑器处理数据前基于预先提供的一组规则来编辑数据流。由于命令都是一行一行顺序处理,sed编辑器必须一次就完成对... 阅读全文
posted @ 2013-12-18 21:05 七年之后 阅读(729) 评论(0) 推荐(0)
摘要: Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementin 阅读全文
posted @ 2013-12-18 15:48 七年之后 阅读(334) 评论(0) 推荐(0)
摘要: Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-negative.思考:大数相乘,模拟算数运算。class Solution {public: string multiply(string num1, string num2) { if(num1=="0"||num2=="0") return "0&qu 阅读全文
posted @ 2013-12-18 14:56 七年之后 阅读(179) 评论(0) 推荐(0)