public void DFS(TreeNode root) {深度优先 Stack<TreeNode> stack = new Stack<>(); stack.add(root); while (!stack.isEmpty()) { // 移除最后一个 TreeNode tempNode = Read More
public static void main(String[] args) { int[] m = {2, 4, 6, 9, 12, 13, 15, 16}; int[] n = {3, 5, 9, 12, 15}; Search(m, n); } private static void Sear Read More
public Map<String, List<String>> getWordList(List<String> list) { Map<String, List<String>> ret = new HashMap<>(); for (int i = 0; i < list.size(); i+ Read More
public static void main(String[] args) { Node n6 = new Node(6); Node n5 = new Node(5); n5.next = n6; Node n4 = new Node(4); n4.next = n5; Node n3 = ne Read More
public static boolean sum2(int ary[], int sum) { int start = 0; int end = ary.length - 1; for (; start < end; ) { if (ary[start] + ary[end] == sum) { Read More
案例数据 id(主键)c(普通索引)d(无索引) 5 5 5 10 10 10 15 15 15 20 20 20 25 25 25 案例一:间隙锁简单案例 步骤事务A事务B 1 begin;select * from t where id = 11 for update; - 2 - insert Read More
public static void main(String[] args) { int ret = commpareStr("abc", "12345cab"); System.out.println(ret); } //orgStr源字段 public static int commpareSt Read More
mysql事务:https://blog.csdn.net/qq_40884473/article/details/105213408 配置: 1 开启慢查询日志 2 开启收集未走索引日志 qt-query-digest 工具: 1 获取耗时长的sql 2 获取IO消耗高的sql 3 未走索引sql Read More
D:\protobuf\1203\protoc.exe ad_tools.proto --java_out=D:\protobuf\1203 --proto_path=D:\protobuf\1203 需要注意 proto.exe 可执行文件的版本需要和java中引入的protobuf的jar包 版 Read More
package test; import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.ut Read More