自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 SpringMVC解决跨域问题

【代码】SpringMVC解决跨域问题。

2024-04-18 17:03:18 122 1

原创 Docker在linux安装

docker安装

2022-07-24 12:17:39 164

原创 ZooKeeper的概述及在linux上的安装

尚硅谷学习笔记

2022-07-21 15:55:38 377

原创 JVM体系结构概述

尚硅谷学习笔记

2022-07-19 14:30:56 129

原创 Github上传项目方法 绑定ssh密钥

自己在github的学习笔记

2022-07-18 16:22:11 390

原创 Git的简介和安装及基本操作,分支操作。

尚硅谷学习笔记

2022-07-18 11:59:18 78

原创 Nginx的作用和功能及在linux系统上的安装

尚硅谷自学笔记

2022-07-17 18:05:06 1923

原创 ElastiSearch基础语句

尚硅谷学习笔记

2022-07-16 13:18:18 134

原创 kibana 在Linux上安装

在Linux上安装kibana

2022-07-16 12:08:24 143

原创 Elasticsearch 在linux上安装

在linux上安装Elasticsearch

2022-07-16 11:45:25 1105

原创 哈希集合在java中的常用操作

1.创建集合HashSet<Integer> set = new HashSet<>();2.添加元素set.add(10);set.add(3);set.add(5);set.add(2);set.add(2);//[10,3,5,2,2]System.out.println(set.toStirng());3.搜索元素set.contains(2);4.删除元素ser.remove(2);System.out.printl.

2022-03-13 19:25:26 819 1

原创 likou389 找不同

class Solution { public char findTheDifference(String s, String t) { char[] schar = s.toCharArray();//将字符串转换为字符数组 char[] tchar = t.toCharArray(); Arrays.sort(schar);//对字符数组进行重新排序 Arrays.sort(tchar); for(int i = 0; i<schar.length;.

2022-03-13 19:18:25 80

原创 力扣217 存在重复元素

class Solution { public boolean containsDuplicate(int[] nums) { if(nums == null || nums.length==0){ //确认数组是否为空 return false; } HashMap<Integer,Integer> map = new HashMap<>();//创建哈希表 for(int num : nums){ .

2022-03-09 17:34:11 90

原创 JAVA哈希表常用操作

1.创建哈希表String[] hashTable = new String[4];//用数组创建哈希表 4代表创建容纳四个String类型的数组HashMap<Integer , String > map = new HashMap<>();//用HashMap创建哈希表 Integer表示key类型 String表示value类型2.添加元素hashTable[1] ="one";hashTable[2]="two";hashTable[3]=".

2022-03-09 16:31:37 647

原创 力扣232 用栈实现队列

class MyQueue { //利用两个栈储存元素 , 第一个栈存储元素后再将元素拿出来存到另一个栈 存到第一个栈元素顺序被反转 存到另一个栈元素再次反转 //此时存储顺序就和队列相同 private Stack<Integer> one; private Stack<Integer> two; public MyQueue() { one = new Stack<>(); two = new.

2022-03-09 14:48:00 184

原创 力扣496 下一个更大元素

class Solution { public int[] nextGreaterElement(int[] nums1, int[] nums2) { int[] res =new int[nums1.length]; //定义返回的数组 Stack<Integer> stack = new Stack<>(); //实例化栈 for(int num : nums2){ stack.push(num); .

2022-03-07 20:54:25 114

原创 力扣20 有效的括号

class Solution { public boolean isValid(String s) { Stack<Character> stack = new Stack<>(); for(int i=0; i<s.length(); i++){ char ch = s.charAt(i); if(ch == '(' || ch =='[' || ch == '{'){ .

2022-03-07 16:35:02 115 1

原创 JAVA栈的日常操作

1.创建栈Stack<Integer> stack = new Stack<>();2.添加元素stack.push(1);stack.push(2);stack.push(3);//[1,2,3]System.out.println(stack.toString());3.获取栈顶元素stack.peek();// 34.删除栈顶元素int temp =stack.pop();// 3 使用pop 不仅会删除栈顶元素 还会将栈顶.

2022-03-06 18:36:19 262

原创 JAVA链表常用操作

1.创建链表LinkedList<Integer> list = new LinkedList<>();2.添加元素List.add(1);List.add(2);List.add(3);//[1,2,3]System.out.println(list.toString());list.add(2,4); //在索引为2的位置上添加4这个元素//[1,2,4,3]System.out.println(list.toString());...

2022-03-06 15:30:49 637

原创 力扣933 最近的请求次数

class RecentCounter {Queue<Integer> queue; public RecentCounter() { queue = new LinkedList<>(); //创建队列 } public int ping(int t) { queue.add(t); //在队列中加入时间点 while(!queue.isEmpty() && t - .

2022-03-06 15:11:53 84

原创 JAVA 队列常用操作

1.创建队列Queue<Integer> queue = new LinkedList<>();//使用链表LinkedList作为对象 利用链表特性 便于插入删除 时间复杂度低2.添加元素queue.add(1);queue.add(2);queue.add(3);[1,2,3]System.out.println(queue.toString());3.获取即将出的队的元素int temp1 = new queue.peek();Sy.

2022-03-06 14:56:35 568

原创 力扣206 反转链表

/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) { this.val = val; } * ListNode(int val, ListNode next) { this.val = val; this.next = next; } * }.

2022-03-04 21:23:29 97

原创 力扣203 移除链表元素

/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) { this.val = val; } * ListNode(int val, ListNode next) { this.val = val; this.next = next; } ...

2022-03-03 21:08:20 185

原创 力扣27 移除元素

class Solution { public int removeElement(int[] nums, int val) {//双指针法 if(nums == null || nums.length == 0){ //判断数组是否为空 return 0; } int l = 0; //定义左指针 int r = nums.length-1; //定义右指针 while(l<r){ .

2022-03-03 20:17:27 32

原创 力扣283 移动零

class Solution { public void moveZeroes(int[] nums) { //冒泡排序法 int n=nums.length; for(int i=n-1;i>0;--i){//从右向左遍历 for(int j=0; j<i; j++){ //防止重复比较 if(nums[j] == 0 && nums[j+1] !=0){//如果j个元素等于0 且下一个元素不等于0 .

2022-03-03 19:18:15 34

原创 力扣485 最大连续1的个数

class Solution { public int findMaxConsecutiveOnes(int[] nums) { if(nums == null || nums.length ==0){ //判断数组是否为空 return 0; } int consecutive_ones =nums[0] ==1? 1 : 0; //定义max变量 如果开头元素为1 则赋值1 不是 赋值0 int max =consecutive_on.

2022-03-03 18:15:08 114

原创 力扣02 两数相加

/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) { this.val = val; } * ListNode(int val, ListNode next) { this.val = val; this.next = next; } * }

2022-03-02 16:52:40 192

空空如也

空空如也

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

TA关注的人

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