上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
摘要: leetcode 每日一题 427. 建立四叉树 class Solution { public Node construct(int[][] grid) {​ return f(grid, 0, 0, grid.length);​ }​ private Node f(int[][] grid, i 阅读全文
posted @ 2022-04-29 11:17 java架构师1 阅读(30) 评论(0) 推荐(0)
摘要: leetcode 每日一题 905. 按奇偶排序数组 class Solution { public int[] sortArrayByParity(int[] nums) { int i = 0; int j = nums.length - 1; while (i < j) { while (nu 阅读全文
posted @ 2022-04-28 09:30 java架构师1 阅读(21) 评论(0) 推荐(0)
摘要: 1.第一步,修改redis配置文件内容 notify-keyspace-events "Ex" 2.项目导入redis依赖 <!-- Redis --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spri 阅读全文
posted @ 2022-04-27 15:22 java架构师1 阅读(899) 评论(0) 推荐(0)
摘要: SQL12 获取每个部门中当前员工薪水最高的相关信息 有一个员工表dept_emp简况如下: emp_no dept_no from_date to_date 10001 d001 1986-06-26 9999-01-01 10002 d001 1996-08-03 9999-01-01 1000 阅读全文
posted @ 2022-04-27 15:05 java架构师1 阅读(86) 评论(0) 推荐(0)
摘要: 隐藏 Thread.sleep 无聊随便写写不做任何用途 实现原理: 1.反射调用Thread.sleep方法 2.把 Class.forName("java.lang.Thread ") 中的字符串 java.lang.Thread 换成ascii码 3.使用int数组来装,同时把ascii码转 阅读全文
posted @ 2022-04-27 09:49 java架构师1 阅读(41) 评论(0) 推荐(0)
摘要: leetcode每日一题 883. 三维形体投影面积 class Solution { public int projectionArea(int[][] grid) { int sum = 0; for (int i = 0; i < grid.length; i++) { int max = 0 阅读全文
posted @ 2022-04-26 10:39 java架构师1 阅读(36) 评论(0) 推荐(0)
摘要: 相同概率获取元素O(n) public static void main(String[] args) { //随机获取元素为3的下标 int target = 3; Random random = new Random(); int[] arr = {1, 2, 3, 3, 3, 4, 5}; i 阅读全文
posted @ 2022-04-25 13:54 java架构师1 阅读(54) 评论(0) 推荐(0)
摘要: leetcode每日一题 398. 随机数索引 class Solution {​ private int[] nums;​ public Solution(int[] nums) { this.nums = nums; } public int pick(int target) { List<In 阅读全文
posted @ 2022-04-25 11:03 java架构师1 阅读(28) 评论(0) 推荐(0)
摘要: find_in_set 查询 随便弄了个表,演示查询效果 阅读全文
posted @ 2022-04-25 09:43 java架构师1 阅读(42) 评论(0) 推荐(0)
摘要: leetcode每日一题 868. 二进制间距 class Solution { public int binaryGap(int n) { char[] arr = Integer.toBinaryString(n).toCharArray(); int[] res = new int[arr.l 阅读全文
posted @ 2022-04-24 08:51 java架构师1 阅读(24) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页