摘要: 分成两种,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 仔细思考一切 阅读(154) 评论(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 仔细思考一切 阅读(772) 评论(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 仔细思考一切 阅读(229) 评论(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 仔细思考一切 阅读(232) 评论(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 仔细思考一切 阅读(222) 评论(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 仔细思考一切 阅读(155) 评论(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 仔细思考一切 阅读(307) 评论(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 仔细思考一切 阅读(165) 评论(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 仔细思考一切 阅读(410) 评论(0) 推荐(0)