摘要: 注意,题目要求要保持两部分的相对顺序,所以,用交换是不行的。import java.util.HashSet;import java.util.Set;class ListNode{ int val; ListNode next; ListNode(int x){ v... 阅读全文
posted @ 2015-12-17 11:15 创业-李春跃-增长黑客 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 分成两种,1种开了额外空间,临时缓冲区,一种没有开import java.util.HashSet;import java.util.Set;class ListNode{ int data; ListNode next;}public class Solution{ public... 阅读全文
posted @ 2015-12-16 23:24 创业-李春跃-增长黑客 阅读(150) 评论(0) 推荐(0) 编辑
摘要: import java.util.*; public class Transform { public int[][] transformImage(int[][] matrix, int n) { // write code here n = matrix.... 阅读全文
posted @ 2015-12-16 17:36 创业-李春跃-增长黑客 阅读(766) 评论(0) 推荐(0) 编辑
摘要: import java.util.*; public class Zipper { public String zipString(String str) { // write code here if(str.length() == 0 ) return str; ... 阅读全文
posted @ 2015-12-16 17:35 创业-李春跃-增长黑客 阅读(224) 评论(0) 推荐(0) 编辑
摘要: import CtCILibrary.AssortedMethods;public class Question { // Assume string has sufficient free space at the end public static void replaceSpace... 阅读全文
posted @ 2015-12-16 17:33 创业-李春跃-增长黑客 阅读(230) 评论(0) 推荐(0) 编辑
摘要: import java.util.*; public class Same { public boolean checkSam(String str1, String str2) { // write code here if(str1.length() !... 阅读全文
posted @ 2015-12-16 17:32 创业-李春跃-增长黑客 阅读(217) 评论(0) 推荐(0) 编辑
摘要: import java.util.*; public class Reverse { public String reverseString(String iniString) { // write code here StringBuffer tmp = new ... 阅读全文
posted @ 2015-12-16 17:30 创业-李春跃-增长黑客 阅读(149) 评论(0) 推荐(0) 编辑
摘要: import java.util.*; public class Different { public boolean checkDifferent(String str) { // write code here for(int i = 0; i < str.le... 阅读全文
posted @ 2015-12-16 17:29 创业-李春跃-增长黑客 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 答案:利用了XY , YX中第一个XYXY包含了第二个public class Solution{ public static void main(String[] args){ System.out.println(isRotation("abc","abc")); ... 阅读全文
posted @ 2015-12-16 17:27 创业-李春跃-增长黑客 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 答案:import java.util.ArrayList;import java.util.List;public class Solution{ public static void main(String[] args){ int[][] matix = {{1,2},{0... 阅读全文
posted @ 2015-12-16 16:50 创业-李春跃-增长黑客 阅读(402) 评论(0) 推荐(0) 编辑