自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 资源 (11)
  • 问答 (1)
  • 收藏
  • 关注

原创 ImageView嵌套进ScrollView,发现图片总是存在间隔

解决方案,将imageView的下面属性设置为true即可android:adjustViewBounds="true" <ScrollView android:layout_width="match_parent" android:padding="0dp" android:layout_margin="0dp"

2017-08-25 11:03:47 1036

原创 322. Coin Change

class Solution { public int coinChange(int[] coins, int amount) { int max = amount + 1; // 最小的币值为1,就算全部用1,硬币个数也不会超过amount + 1 int d[] = new int[amount+1]; Ar

2017-08-20 21:07:45 269

原创 198. House Robber

public class Solution { public static int[] result; public int solve(int idx,int[] nums){ if(idx < 0){ return 0; } if(result[idx] >=0 ){ return

2017-08-17 23:03:38 258

原创 94. Binary Tree Inorder Traversal

/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution {

2017-08-13 18:22:54 250

原创 144. Binary Tree Preorder Traversal

/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Solution {

2017-08-13 18:18:38 226

原创 101. Symmetric Tree

1.100题的变形/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class S

2017-08-13 16:51:43 234

原创 100. Same Tree

public class Solution { public boolean isSameTree(TreeNode p, TreeNode q) { if(p == null && q == null) return true; if(p!= null && q !=null && p.val == q.val){ re

2017-08-13 16:44:51 233

原创 124. Binary Tree Maximum Path Sum

1.定义maxDeep(x)为以x为根节点的树的max path   maxDeep(x)等于在下面a,b,c中找到一个最大的值,c的话是因为左子树的max path 和 右子树的max path可能值为负   a.左子树的max path  + x自身的值   b.右子树的max path  + x自身的值   c.x自身的值/** * Definition for

2017-08-07 11:25:22 256

原创 112. Path Sum

1.递归搜索树/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */public class Sol

2017-08-07 09:37:56 252

原创 50. Pow(x, n)

1.换底公式public class Solution { public double myPow(double x, int n) { int sign = 1; if( x < 0 && n % 2 == 1){ sign = -1; } x = Math.abs(x); ret

2017-08-06 17:40:55 516

原创 378. Kth Smallest Element in a Sorted Matrix

public class Solution { public boolean guess(int g,int[][] matrix, int k, int n){ int sum = 0; for(int i = 0; i < n; i++){ int L = 0; int R = n-1;

2017-08-05 23:26:27 211

原创 69. Sqrt(x)

1.二分法解题,最恶心的就是边界问题,为了边界问题基本上都得调试一段时间  注意,当 x 为 int 时,相乘会越界(大于int的最大数2147483647) ,所以用 相除 代替 相乘public class Solution { public int mySqrt(int x) { if(x<=1) return x; int left =

2017-08-03 09:42:14 249

原创 202. Happy Number

1.题目说的是对任意一个正整数,不断各个数位上数字的平方和,若最终收敛为1,则该数字为happy number,否则程序可能从某个数开始陷入循环。这里我们使用一个HashSet表存储已经出现过的数字,如果下次还出现,则返回false。public class Solution { public boolean isHappy(int n) { Set set = n

2017-08-02 09:53:10 202

原创 292. Nim Game

1.此类问题为一类问题,记住即可,若1次最多可取k个(k在问题中是看作常量),记f(n)代表自己先拿,总共有n块石头时,自己是必输还是必胜。 当 n % (k+1)  == 0 时,代表自己必胜比如 k = 4 时,代表一次性可拿 1块,2块,3块,4块石头,而f(1)代表桌上总共有1块石头可拿,自己先拿的情况下,是必输还是必胜?     可以知道,f(1),桌上石头只有1块,而自己可

2017-08-01 16:38:09 200

spring-framework-3.0.5.RELEASE-dependencies

spring-framework-3.0.5.RELEASE-dependencies

2016-02-22

spring-framework-3.0.5.RELEASE-with-docs.zip

spring-framework-3.0.5.RELEASE-with-docs

2016-02-22

apache stratos 4.1.0的samples

apache stratos 4.1.0的samples

2015-11-24

PullZoomView 支持ScollView和ListView的上方View随下拉放大效果

简单使用教程 http://blog.csdn.net/zhouhuakang/article/details/47251587

2015-08-03

ZXingForAndroid

利用ZXing开源项目,实现条形码和二维码扫描

2015-07-28

android 自定义Seekbar,包括图片,背景颜色

android 自定义Seekbar,包括图片,背景颜色,网上的小例子

2013-07-19

android平台使用ORMLite的小例子

网上找的一个例子,但是有些bug,现在修正好后上传,有助于理解ORMLite的使用

2013-07-18

解决提示shimgvw.dll找不到或缺少的问题

解决提示shimgvw.dll找不到或缺少的问题

2011-09-13

ASP技术实用教程ASP技术实用教程

ASP技术实用教程 ASP技术实用教程 ASP技术实用教程

2011-03-25

装iis必用的msmqocm.dll

装iis必用的msmqocm.dll 装iis必用的msmqocm.dll

2011-02-26

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除