上一页 1 2 3 4 5 6 7 8 ··· 13 下一页
摘要: 题目链接:https://leetcode-cn.com/problems/add-two-numbers-ii/submissions/ 解题思路: 阅读全文
posted @ 2019-07-18 20:24 王爷爱吃秋刀鱼 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list/ 阅读全文
posted @ 2019-07-18 19:24 王爷爱吃秋刀鱼 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.*; 2 public class Sum{ 3 4 public static void jisuan(int W,int[] val,int [] wei) 5 { 6 7 } 8 9 public static void main(String[] args) { ... 阅读全文
posted @ 2019-07-14 15:06 王爷爱吃秋刀鱼 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 1 package Test; 2 import java.util.*; 3 public class Solution { 4 5 public static int jisuan(int W,int[] wei,int [] val,int n) 6 { 7 int i,w; 8 int[][] K=new int[... 阅读全文
posted @ 2019-07-05 14:59 王爷爱吃秋刀鱼 阅读(108) 评论(0) 推荐(0) 编辑
摘要: class Solution {//比较简单的动态规划题 public int uniquePaths(int m, int n) { int[][] dp =new int[m][n]; for(int i=0;i<=m-1;i++) { for(int j=0... 阅读全文
posted @ 2019-07-05 11:24 王爷爱吃秋刀鱼 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode-cn.com/problems/minimum-depth-of-binary-tree/ 解题思路: 都是层次遍历,判断返回的条件不一样。 阅读全文
posted @ 2019-06-26 19:46 王爷爱吃秋刀鱼 阅读(161) 评论(0) 推荐(0) 编辑
摘要: package Sort; import java.util.Arrays; import java.util.ArrayList; import java.util.Stack; public class BubbleSort { public class TreeNode { int val = 0; TreeNode left = null... 阅读全文
posted @ 2019-06-26 10:46 王爷爱吃秋刀鱼 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 大顶堆排序,排成 1 2 3 4 5 6 7 8 小顶堆排序,排成 9 8 7 6 5 4 3 2 1 阅读全文
posted @ 2019-06-26 10:00 王爷爱吃秋刀鱼 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 1 public class Solution { 2 public int FindGreatestSumOfSubArray(int[] array) { 3 int sum=array[0]; 4 int flag=0; 5 int res = array[0]; 6 if(array.length==... 阅读全文
posted @ 2019-06-25 17:29 王爷爱吃秋刀鱼 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 public class ListNode { 3 int val; 4 ListNode next = null; 5 6 ListNode(int val) { 7 this.val = val; 8 } 9 }*/ 10 public class Solution { 11 public ListNo... 阅读全文
posted @ 2019-06-23 19:09 王爷爱吃秋刀鱼 阅读(149) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 13 下一页