摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order).The replacement must be in-place, do not allocate extra memory.He 阅读全文
posted @ 2013-07-31 20:40 feiling 阅读(494) 评论(0) 推荐(0) 编辑
摘要: 思路:从左往右扫描主字符串,用两个map来统计字符串的出现次数这里L数组中可能会出现两个相同的字符串 1 import java.util.Collection; 2 public class Solution { 3 public ArrayList findSubstring(String S, String[] L) { 4 ArrayList results = new ArrayList(); 5 int len = L.length; 6 if (len == 0) { 7 results.add(0... 阅读全文
posted @ 2013-07-31 20:17 feiling 阅读(379) 评论(0) 推荐(0) 编辑