上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页
摘要: 1824. 最少侧跳次数 题解 dp 数组: dp[i] 表示 到 第i条赛道的最小侧跳次数 class Solution { public int minSideJumps(int[] obstacles) { int INF = (int) 0x3f3f3f3f; int len = obsta 阅读全文
posted @ 2023-01-21 13:30 Eiffelzero 阅读(14) 评论(0) 推荐(0)
摘要: 1817. 查找用户活跃分钟数 题解 模拟: 用map存,map的key存用户id,value存该用户的操作的time列表(去重,可以用set) 统计res,遍历map,map的value为 该用户的操作时间list,用这个list的size 放到相应的res数组里(注意res的下标从1开始,所以要 阅读全文
posted @ 2023-01-20 14:48 Eiffelzero 阅读(35) 评论(0) 推荐(0)
摘要: 官方文档:https://dev.mysql.com/doc/refman/5.7/en/ 书: 1.《高性能MySQL》 2.《MySQL是怎样运行的:从根儿上理解MySQL》 https://juejin.cn/book/6844733769996304392 https://relph1119 阅读全文
posted @ 2023-01-18 14:47 Eiffelzero 阅读(30) 评论(0) 推荐(0)
摘要: 2287. 重排字符形成目标字符串 class Solution { public int rearrangeCharacters(String s, String target) { int[] cnt = new int[30]; for (char c : s.toCharArray()) { 阅读全文
posted @ 2023-01-13 23:44 Eiffelzero 阅读(39) 评论(0) 推荐(0)
摘要: 脏写( Dirty Write ) 如果一个事务修改了另一个未提交事务修改过的数据,那就意味着发生了脏写 脏读( Dirty Read ) 如果一个事务读到了另一个未提交事务修改过的数据,那就意味着发生了脏读 不可重复读(Non-Repeatable Read) 如果一个事务只能读到另一个已经提交的 阅读全文
posted @ 2023-01-12 16:39 Eiffelzero 阅读(65) 评论(0) 推荐(0)
摘要: 2283. 判断一个数的数字计数是否等于数位的值 class Solution { public boolean digitCount(String num) { int[] a = new int[10]; char[] chars = num.toCharArray(); int[] cnt = 阅读全文
posted @ 2023-01-11 03:35 Eiffelzero 阅读(23) 评论(0) 推荐(0)
摘要: 2185. 统计包含给定前缀的字符串 class Solution { public int prefixCount(String[] words, String pref) { int res = 0; for (String word : words) { if (isEqual(word, p 阅读全文
posted @ 2023-01-08 20:28 Eiffelzero 阅读(20) 评论(0) 推荐(0)
摘要: 1802. 有界数组中指定下标处的最大值 class Solution { public int maxValue(int n, int index, int maxSum) { int l = 1, r = (int) 1e9; while (l < r) { int mid = (l + r + 阅读全文
posted @ 2023-01-04 21:30 Eiffelzero 阅读(19) 评论(0) 推荐(0)
摘要: 2042. 检查句子中的数字是否递增 class Solution { public boolean areNumbersAscending(String s) { char[] ch = s.toCharArray(); int pre = -1; for (int i = 0; i < ch.l 阅读全文
posted @ 2023-01-03 17:17 Eiffelzero 阅读(21) 评论(0) 推荐(0)
摘要: 2351. 第一个出现两次的字母 class Solution { public char repeatedCharacter(String s) { char[] chars = s.toCharArray(); int[] f = new int[30]; for (int i = 0; i < 阅读全文
posted @ 2023-01-01 22:13 Eiffelzero 阅读(27) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页