摘要:
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... 阅读全文
摘要:
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 阅读全文