自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 模拟加法

模拟加法public class PlusString { public static String plusString(String numsStr1, String numsStr2) { if (numsStr1 == null || numsStr2 == null) { System.err.println("invalid_input,check..."); } ...

2018-04-12 19:56:19 288

原创 DP跳跃游戏

public static void DPJump(int[] jumps, int jumpsLength) //jumps[i]:当前位置i的最大跳跃距离,jumpsLength台阶数 { if(jumps == null || jumpsLength < 0) return ; int[] minJumps = new int[jumpsLength];//...

2018-04-12 16:09:17 216

原创 贪心算法求最少付出硬币个数

public class TanXinCoin { public static void tanXinCoin(int[] coins, int coinsLength, int totalMoney) { if(coins == null || coinsLength < 0) return ; for(int i = 0; i < coinsLength; i...

2018-04-12 13:05:42 1001

原创 动态规划求付出的最少硬币数

问题是这样的:假设我有多种面值的硬币,都不限量,此时给定我一个整数金额,怎么组合出最少硬币数?public class DPCoin { public static void getMinestCoinsNum(int[] coins, int coinsLength, int money) { if(coins == null || coinsLength < 0 || money ...

2018-04-12 12:53:56 789

原创 快速排序的优化

改进快排性能的其中一个方法是使用子数组的一小部分元素的中位数来切分数组,我们将取样大小设为3,取子数组的头、尾、中间位置的3个结点,取其3值的中位数作为基准点。private static int partition(int[] data, int low, int high) { // 三取样切分 int mid = low + (high - low) / 2; if (data[...

2018-04-02 14:31:34 159

空空如也

空空如也

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

TA关注的人

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