菜单

江河水总有入海之时

归档

2020 年 10 月

1.HashSetHashSet有以下特点:不能保证元素的排列顺序,顺序有可能发生变化不是同步的集合元素可以是null,但只能放入一个null当向HashSet集合中存入一个元素时,HashSet会调用该对象的hashCode()方法来得到该对象的hashCo

2020-10-22

FastJson用法1.导入依赖<dependency> <groupId>com.jwebmp.jackson.core</groupId> <artifactId>

2020-10-20

线性表public class SqList<T> { static int LIST_INIT_SIZE; static int LIST_INCREMENT_SIZE; private Object[] elements;

2020-10-20

多项式加法public class Polynomial {Polynomial next; double data; // 系数值 int power; // 幂值 public Polynomial(){ this(0.0, -1); } public
栈的应用(走迷宫问题)import lombok.AllArgsConstructor;import java.util.Stack;@AllArgsConstructorclass OneStep{ int x; int y; int di

2020-10-20

快速排序public static void quickSort(int [] array,int left,int right) { if (array==null||array.length==0||left>right)

2020-10-20

基本的二分查找非递归public int binarySearch(int []nums ,int target) { int low=0; int high=nums.length-1; int mid;

2020-10-20

循环队列package cn.duckflew.LeetCode;class MyCircularQueue { private int[] queue; private int capacity; private int size;

2020-10-20

二叉树@Data@AllArgsConstructor@NoArgsConstructorpublic class BinaryTreeNode{ private int data; private BinaryTreeNode leftChild