摘要:
给出的是一个字符串数组,然后去求这些字符串的最长公共前缀,挺有意思的一道题目。public class Solution { public String longestCommonPrefix(String[] strs) { if (strs.length==0||strs[0... 阅读全文
posted @ 2014-10-22 23:06 八竿子打不着 阅读(138) 评论(0) 推荐(0)
|
|
|
|
摘要:
给出的是一个字符串数组,然后去求这些字符串的最长公共前缀,挺有意思的一道题目。public class Solution { public String longestCommonPrefix(String[] strs) { if (strs.length==0||strs[0... 阅读全文
posted @ 2014-10-22 23:06 八竿子打不着 阅读(138) 评论(0) 推荐(0)
摘要:
将图片旋转90°,实际上就是在操作数组,感觉实际中canvas可以用到。public class Solution { public void rotate(int[][] matrix) { if (matrix.length == 1) { return... 阅读全文
posted @ 2014-10-22 22:47 八竿子打不着 阅读(90) 评论(0) 推荐(0) |
|