上一页 1 2 3 4 5 6 7 ··· 12 下一页
摘要: import java.util.*; public class Solution { public int evalRPN(String[] tokens) { //int temp = 0; Stack stack = new Stack(); for( int i = 0; i < tokens.length; i++)... 阅读全文
posted @ 2019-06-08 16:38 紫色的雪 阅读(98) 评论(0) 推荐(0)
摘要: /** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ import java.util.*; public class... 阅读全文
posted @ 2019-06-08 14:13 紫色的雪 阅读(161) 评论(0) 推荐(0)
摘要: public class Solution { public int movingCount(int threshold, int rows, int cols) { if(threshold =0 && row=0 && col0){ sum+=number%10; number = number/10; ... 阅读全文
posted @ 2019-06-06 21:41 紫色的雪 阅读(1553) 评论(0) 推荐(0)
摘要: public class Solution { public boolean hasPath(char[] matrix, int rows, int cols, char[] str) { boolean[] visited = new boolean[matrix.length]; if( matrix == null || matrix.le... 阅读全文
posted @ 2019-06-06 19:39 紫色的雪 阅读(511) 评论(0) 推荐(0)
摘要: import java.util.*; public class Solution { public ArrayList maxInWindows(int [] num, int size) { ArrayList list = new ArrayList(); if( num == null || size == 0 ){ ... 阅读全文
posted @ 2019-06-06 09:26 紫色的雪 阅读(516) 评论(0) 推荐(0)
摘要: import java.util.*; public class Solution { List list = new ArrayList(); public void Insert(Integer num) { list.add(Double.valueOf(num)); Collections.sort(list); } p... 阅读全文
posted @ 2019-06-05 20:07 紫色的雪 阅读(393) 评论(0) 推荐(0)
摘要: /* public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { this.val = val; } } */ import java.util.*; public class... 阅读全文
posted @ 2019-06-05 14:47 紫色的雪 阅读(959) 评论(0) 推荐(0)
摘要: /* public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { this.val = val; } } */ public class Solution { //序列化... 阅读全文
posted @ 2019-06-03 21:26 紫色的雪 阅读(397) 评论(0) 推荐(0)
摘要: import java.util.ArrayList; /* public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { this.val = val; } } */ imp... 阅读全文
posted @ 2019-06-03 11:21 紫色的雪 阅读(570) 评论(0) 推荐(0)
摘要: import java.util.ArrayList; /* public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { this.val = val; } } */ impo... 阅读全文
posted @ 2019-06-03 10:02 紫色的雪 阅读(521) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 12 下一页