摘要: Write a function to find the longest common prefix string amongst an array of strings.public class Solution { public String longestCommonPrefix(String[] strs) { String compare =""; if(strs.length == 0) return compare; compare = strs[0]; for(int i = 1... 阅读全文
posted @ 2014-02-16 03:52 Razer.Lu 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.Note:Givenm,nsatisfy the following condition:1 ≤m≤n≤ length of list.ref:http://www.cnblogs.com/feiling/p/3263501.html添加一个s 阅读全文
posted @ 2014-02-16 03:00 Razer.Lu 阅读(158) 评论(0) 推荐(0) 编辑