摘要: 原数组 arr [4 2 3 1 5] LinkedList<Integer> vec ; i arr vec 0 4 4 //直接添加 1 2 2 // 2小于4 替换掉4 2 3 2 3 //直接添加 3 1 1 3 // 1 小于 2 替换。 即 arr[i] 替换掉 vec中 第一个比 ar 阅读全文
posted @ 2021-09-16 16:17 _lemonV 阅读(29) 评论(0) 推荐(0) 编辑
摘要: Spring事务失效的12种场景 转载于 https://mp.weixin.qq.com/s/4M4rePjjy8-UBVvCzHchTQ 前言 对于从事java开发工作的同学来说,spring的事务肯定再熟悉不过了。 在某些业务场景下,如果一个请求中,需要同时写入多张表的数据。为了保证操作的原子 阅读全文
posted @ 2021-09-10 09:44 _lemonV 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 面试遇到了几个面试题 记录一下。 1. 反射 + 代理 import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; /** * 1. IA 接 阅读全文
posted @ 2021-09-09 09:29 _lemonV 阅读(60) 评论(0) 推荐(0) 编辑
摘要: java ~ 非运算操作 看源码ThreadPoolExecutor 源码时,看到了这么一段 ~ 非运算符自己编程的时候用的比较少,于是就验证了一下这个运算符。 //https://blog.csdn.net/wenxinwukui234/article/details/42119265 关于补码, 阅读全文
posted @ 2021-08-30 13:56 _lemonV 阅读(283) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/1564232/202108/1564232-20210830091039098-1925604936.jpg) 阅读全文
posted @ 2021-08-30 09:11 _lemonV 阅读(21) 评论(0) 推荐(0) 编辑
摘要: package Exercises; import java.util.Arrays; import java.util.Scanner; /** * 大数字之和, 字符串-字符数组实现 * 2020 07 12 */ public class TheSumOfLargeNumbers { publ 阅读全文
posted @ 2021-08-27 16:16 _lemonV 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 1.BST (Binary Search Tree) package BinarySearchTree; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.u 阅读全文
posted @ 2021-08-27 15:08 _lemonV 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 1.动图演示 1.1自顶向下的归并排序 2.代码实现 2.1自顶向下的归并排序 package sort; import java.util.Arrays; // 测试工具类在这里 https://www.cnblogs.com/paidaxing7090/p/15080493.html impor 阅读全文
posted @ 2021-08-27 14:43 _lemonV 阅读(44) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public ListNode ReverseList(ListNode head) { ListNode pre = null; //保存前驱节点 ListNode cur = head; // cur 一开始指向头节点 ListNode nex = 阅读全文
posted @ 2021-08-27 10:35 _lemonV 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 使用top命令、dump文件定位问题 1.背景 定位java应用出问题的代码块 2.一个demo 一个springboot创建的demo import org.springframework.web.bind.annotation.GetMapping; import org.springframe 阅读全文
posted @ 2021-08-26 10:44 _lemonV 阅读(141) 评论(0) 推荐(0) 编辑