02 2017 档案

摘要:java中String、StringBuffer、StringBuilder是编程中经常使用的字符串类,他们之间的区别也是经常在面试中会问到的问题。现在总结一下,看看他们的不同与相同。 1.可变与不可变 String类中使用字符数组保存字符串,如下就是,因为有“final”修饰符,所以可以知道str 阅读全文
posted @ 2017-02-18 17:15 飞轩 阅读(254) 评论(0) 推荐(0)
摘要:find / type f size +100M | xargs rm rf 其中第一个/表示路径,此时表示的是根目录,也就是搜索全部的文件 type表示类型 f表示是文件 size 表示大小 +100M:表示大于100M 后面就是执行的命令。 当然也可以寻找特定后缀的文件,比如:find / na 阅读全文
posted @ 2017-02-15 09:33 飞轩 阅读(5293) 评论(0) 推荐(0)
摘要:1.题目描述 Write a function to find the longest common prefix string amongst an array of strings. 找到一组字符串的最长前缀。 2.我的分析思路 这一题的第一思路就是,把第一个字符串作为基准,遍历每个子字符串,然 阅读全文
posted @ 2017-02-12 21:06 飞轩 阅读(188) 评论(0) 推荐(0)
摘要:1.题目描述 Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 2.我的分析思路 罗马数字转成阿拉伯数字,这里面需要知道罗马数字的构成 阅读全文
posted @ 2017-02-12 20:58 飞轩 阅读(2596) 评论(0) 推荐(1)
摘要:1.题目描述 Given a string, find the length of the longest substring without repeating characters. Examples: Given =="abcabcbb"==, the answer is =="abc"==, 阅读全文
posted @ 2017-02-12 20:43 飞轩 阅读(210) 评论(0) 推荐(0)
摘要:1.题目描述 You are given two non empty linked lists representing two non negative integers. The digits are stored in reverse order and each of their nodes 阅读全文
posted @ 2017-02-09 09:56 飞轩 阅读(1396) 评论(0) 推荐(0)
摘要:1.题目描述 Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, 1) If you a 阅读全文
posted @ 2017-02-07 21:23 飞轩 阅读(193) 评论(0) 推荐(0)
摘要:1.题目描述 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = 123, return 321 Note: The input is assumed to be a 32 bit signed inte 阅读全文
posted @ 2017-02-07 09:42 飞轩 阅读(160) 评论(0) 推荐(0)
摘要:1.题目描述 Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would 阅读全文
posted @ 2017-02-06 11:42 飞轩 阅读(208) 评论(0) 推荐(0)