摘要: MEMORY REPLAY WITH DATA COMPRESSION FOR CONTINUAL LEARNING--阅读笔记 摘要: 在这项工作中,我们提出了使用数据压缩(MRDC)的内存重放,以降低旧的训练样本的存储成本,从而增加它们可以存储在内存缓冲区中的数量。观察到压缩数据的质量和数量之间 阅读全文
posted @ 2023-04-25 13:53 ZLey 阅读(31) 评论(0) 推荐(0) 编辑
摘要: leetcode_打卡11 题目:392. 判断子序列 代码: class Solution { public boolean isSubsequence(String s, String t) { int n = s.length(), m = t.length(); int i = 0, j = 阅读全文
posted @ 2023-04-22 23:15 ZLey 阅读(10) 评论(0) 推荐(0) 编辑
摘要: leetcode_打卡10 题目:283. 移动零 思路:双指针,数值互相交换,不是复制覆盖 代码: class Solution { public void moveZeroes(int[] nums) { int n=nums.length; int l=0,r=0; while(r<n){ i 阅读全文
posted @ 2023-04-21 12:25 ZLey 阅读(11) 评论(0) 推荐(0) 编辑
摘要: leetcode_打卡09 题目:443. 压缩字符串 思路:双指针 代码: class Solution { public int compress(char[] chars) { int n = chars.length; int write = 0, left = 0; for (int re 阅读全文
posted @ 2023-04-21 12:25 ZLey 阅读(7) 评论(0) 推荐(0) 编辑
摘要: leetcode_打卡08 题目:334. 递增的三元子序列 思路:分成左边L和右边R,只要找到该数左边比它小的,右边比他大的即可 代码: class Solution { public boolean increasingTriplet(int[] nums) { int n=nums.lengt 阅读全文
posted @ 2023-04-19 22:44 ZLey 阅读(12) 评论(0) 推荐(0) 编辑
摘要: leetcode_打卡7 题目:238. 除自身以外数组的乘积 思路: 代码: class Solution { public int[] productExceptSelf(int[] nums) { int n=nums.length; int sum=1,result=1; int j=0; 阅读全文
posted @ 2023-04-18 22:22 ZLey 阅读(8) 评论(0) 推荐(0) 编辑
摘要: leetcode_打卡06 题目:151. 反转字符串中的单词 思路: 先把字符串根据空格进行分割,分割成一个字符串数组; 对字符串数组进行逆置; 拼接字符串数组; class Solution { public String reverseWords(String s) { // 除去开头和末尾的 阅读全文
posted @ 2023-04-17 22:10 ZLey 阅读(8) 评论(0) 推荐(0) 编辑
摘要: GCR: Gradient Coreset based Replay Buffer Selection for Continual Learning 摘要:本文提出了一种创新的重放缓冲区选择和更新策略,梯度核心集重放(GCR),使用一种设计优化标准。 该方法选择和维持一个“coreset” ,它非常 阅读全文
posted @ 2023-04-17 22:09 ZLey 阅读(75) 评论(0) 推荐(0) 编辑
摘要: leetcode_打卡5 题目:345. 反转字符串中的元音字母 思路:双指针 class Solution { public String reverseVowels(String s) { int n=s.length(); char[] arr=s.toCharArray(); int i=0 阅读全文
posted @ 2023-04-16 21:34 ZLey 阅读(8) 评论(0) 推荐(0) 编辑
摘要: leetcode_打卡04 题目:605. 种花问题 解答: 三种情况: 第一个1的左边全是0的情况,此时 可以插入的位置为result=(i-1+1)/2 ,如【0,0,0,1,0,0,1】 两个1之间全是0的情况。此时 可以插入的位置为result=(i-flag-1-2+1)/2 第一个1的右 阅读全文
posted @ 2023-04-14 21:07 ZLey 阅读(7) 评论(0) 推荐(0) 编辑