自定义博客皮肤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)
  • 收藏
  • 关注

原创 List遍历的时候删除元素的相关问题及解决方法

package com.gaopengyu; import java.util.ArrayList; import java.util.Iterator; import java.util.List; class Person { int age; String name; Person(int age, String name) { this.ag...

2018-08-03 10:33:23 229

原创 矩阵中的路径12

package swordOffre.gaopengyu; import java.awt.*; public class PathInMatrix12 { public static void main(String[] args) { char[] matrix = new char[]{'a', 'b', 't', 'g', 'c', 'f', 'c', 'g'...

2018-07-31 20:08:01 118

原创 旋转数组中的最小数字11

package swordOffre.gaopengyu; public class MinInRotateArray11 { public static void main(String[] args) { // int[] arr = new int[]{3, 4, 5, 1, 2}; // int[] arr = new int[]{1,2,3,4,5...

2018-07-31 16:41:51 88

原创 用两个队列实现栈9.1

package swordOffre.gaopengyu; import java.util.LinkedList; import java.util.Queue; class stackEmptyException extends Exception { String str; stackEmptyException(String str) { this...

2018-07-30 17:02:38 105

原创 用两个栈实现队列9

package swordOffre.gaopengyu; import java.lang.reflect.Method; import java.util.Stack; class QueueWith2Stack<T> { Stack<T> stack1 = new Stack(); Stack<T> stack2 = new Stac...

2018-07-30 16:10:49 117

原创 二叉树的下一份节点8

package swordOffre.gaopengyu; class TreeNodeWithParent { String val; TreeNodeWithParent left; TreeNodeWithParent right; TreeNodeWithParent parent; TreeNodeWithParent(String val,...

2018-07-29 09:34:38 78

原创 重建二叉树7

package swordOffre.gaopengyu; public class BuildBST7 { static int[] preOrder = new int[]{1, 2, 4, 7, 3, 5, 6, 8}; static int[] inOrder = new int[]{4, 7, 2, 1, 5, 3, 8, 6}; public static...

2018-07-29 08:38:35 73

原创 从尾到头打印链表6

package swordOffre.gaopengyu; class LinkedListNode { int val; LinkedListNode next; public LinkedListNode(int val, LinkedListNode next) { this.val = val; this.next = next...

2018-07-24 15:00:22 63

原创 替换空格5

package swordOffre.gaopengyu; public class StringReplace5 { public static void main(String[] args) { String s = "we are happy."; String result = getReplaceString(s); Syst...

2018-07-24 14:47:24 92

原创 二维数组中的查找4

package swordOffre.gaopengyu; public class FindIn2DimensionArray4 { public static void main(String[] args) { int[][] arr = new int[][]{{1, 2, 8, 9}, {2, 4, 9, 12}, {4, 7, 10, 13}, {6, 8,...

2018-07-24 11:15:43 96

原创 数组中重复的数字3

package swordOffre.gaopengyu; public class DumplicatNum3 { public static void main(String[] args) { int[] arr = new int[]{1, 2, 11, 5, 7, 8, 9, 4, 3, 10, 6, 0}; int result = getD...

2018-07-24 10:57:05 98

原创 堆排序实现

package com.inner; public class HeapSort { /** * ������ * @param args */ public static void main(String[] args) { int[] arr = new int[]{1,2,3,4,6,5}; System.out.print...

2018-07-23 21:46:10 244

原创 实现singleton模式2

package swordOffre.gaopengyu; // 剑指offer2题----实现singleton模式 public class Singleton2 { // 饿汉模式 贪婪加载 private Singleton2() { } private static Singleton2 singleton = new Singleton...

2018-07-23 20:51:39 134

原创 二叉树中和为某一值的路径34

package swordOffre.gaopengyu; import java.util.Stack; class TreeNode { int val; TreeNode left; TreeNode right; public TreeNode(int val, TreeNode left, TreeNode right) { thi...

2018-07-23 20:47:13 97

空空如也

空空如也

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

TA关注的人

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