上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页
摘要: /* public class ListNode { int val; ListNode next = null; ListNode(int val) { this.val = val; } }*/ import java.util.Stack; public class Solution { public ListNode FindF... 阅读全文
posted @ 2019-05-20 20:15 紫色的雪 阅读(140) 评论(0) 推荐(0)
摘要: public class Solution { public int InversePairs(int [] array) { if(array.length==0){ return 0; } int[] copy = new int[array.length]; for(int i = 0;i =... 阅读全文
posted @ 2019-05-20 14:58 紫色的雪 阅读(361) 评论(0) 推荐(0)
摘要: import java.util.HashMap; import java.util.Map; public class Solution { public int FirstNotRepeatingChar(String str) { if(str==null||str.length()==0){ return -1; } ... 阅读全文
posted @ 2019-05-17 09:51 紫色的雪 阅读(1591) 评论(0) 推荐(0)
摘要: public class Solution { public int GetUglyNumber_Solution(int index) { if(index<=0){ return 0; } int[] p = new int[index]; p[0]=1; int p2=0; ... 阅读全文
posted @ 2019-05-16 21:27 紫色的雪 阅读(1268) 评论(0) 推荐(0)
摘要: public class Solution { public String PrintMinNumber(int [] numbers) { String string = ""; String[] sb = new String[numbers.length]; StringBuffer stringBuffer = new String... 阅读全文
posted @ 2019-05-16 10:33 紫色的雪 阅读(527) 评论(0) 推荐(0)
摘要: public class Solution { public int NumberOf1Between1AndN_Solution(int n) { if(n==0){ return 0; } int count=0; for(int i = 1;i<=n;i++){ ... 阅读全文
posted @ 2019-05-15 20:52 紫色的雪 阅读(338) 评论(0) 推荐(0)
摘要: public class Solution { public int FindGreatestSumOfSubArray(int[] array) { int sum=0; int res=array[0]; for (int i=0;ires){ res=sum; } ... 阅读全文
posted @ 2019-05-15 20:18 紫色的雪 阅读(555) 评论(0) 推荐(0)
摘要: import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Solution { public ArrayList GetLeastNumbers_Solution(int [] input, int k) { List list = new A... 阅读全文
posted @ 2019-05-15 19:52 紫色的雪 阅读(1081) 评论(0) 推荐(0)
摘要: import java.util.HashMap; import java.util.Map; public class Solution { public int MoreThanHalfNum_Solution(int [] array) { if(array.length==0){ return 0; } Ma... 阅读全文
posted @ 2019-05-15 19:30 紫色的雪 阅读(641) 评论(0) 推荐(0)
摘要: package myprac.LeetCode; import java.util.ArrayList; import java.util.List; public class StringPermutation { /* public static ArrayList Permutation(String str) { ArrayList list = new Arr... 阅读全文
posted @ 2019-05-14 20:29 紫色的雪 阅读(1927) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页