自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 全组合

import java.util.ArrayList;import java.util.List;public class Solution { public List<List<Integer>> subsets(int[] nums) { List<List<Integer>> result = new ArrayList<>(); result.add(

2016-09-29 00:16:03 289

原创 组合 N选K

import java.util.ArrayList;import java.util.Arrays;import java.util.List;public class Solution { public void add(int[] array, int[] nums, List<List<Integer>> result) { List<Integer> list =

2016-09-28 23:51:45 389

原创 全排列 去重 非字典序

import java.util.ArrayList;import java.util.HashSet;import java.util.List;import java.util.Set;public class Solution { public List<List<Integer>> permute(int[] nums) { List<List<Integer>

2016-09-28 22:59:09 314

原创 01背包

import java.util.Scanner;public class Main { public static void main(String argv[]) { Scanner in = new Scanner(System.in); while (in.hasNext()) { int n = in.nextInt();

2016-09-28 22:14:24 243

原创 全排列-字典序

import java.util.Scanner;public class Solution { static int count = 2; public static void swap(char[] arr, int i, int j) { char tmp = arr[i]; arr[i] = arr[j]; arr[j] = tm

2016-09-28 21:52:58 259

原创 旋转矩阵

import java.util.Arrays;public class Solution { //顺时针旋转90度 public void rotate(int[][] matrix) { for (int i = 0, j = matrix.length - 1; i < j; i++, j--) { int[] temp = matrix

2016-09-17 13:16:31 343

原创 小明看旗

import java.util.Scanner;public class Main{ public static boolean isForward(String line, String target1, String target2){ int pos = -1; pos = line.indexOf(target1); if(pos =

2016-09-11 11:37:19 657

原创 内存分配指令执行器

import java.util.ArrayList;import java.util.List;import java.util.Scanner;class Mem { int handle; int start; int count; public Mem(int handle, int start, int count) { this.hand

2016-09-11 11:22:21 312

空空如也

空空如也

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

TA关注的人

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