Weekly Contest 392 周赛题目解析

Posted on Sun 31 March 2024 in Leetcode • Tagged with Contest

2024-03 Leetcode Weekly Contest 392 第 392 场力扣周赛 | 3105. Longest Strictly Increasing or Strictly Decreasing Subarray 最长的严格递增或递减子数组 | 3106. Lexicographically Smallest String After Operations With Constraint 满足距离约束且字典序最小的字符串 | 3107. Minimum Operations to Make Median of Array Equal to K 使数组中位数等于 K 的最少操作数 | 3108. Minimum Cost Walk in Weighted Graph 带权图里旅途的最小代价 | Solution to contest problems 赛题讲解 | Dual Pointer 双指针 | Union Find 并查集


Continue reading

Weekly Contest 390 周赛题目解析

Posted on Sun 24 March 2024 in Leetcode • Tagged with Contest

2024-03 Leetcode Weekly Contest 390 第 390 场力扣周赛 | 3090. Maximum Length Substring With Two Occurrences 每个字符最多出现两次的最长子字符串 | 3091. Apply Operations to Make Sum of Array Greater Than or Equal to k 执行操作使数据元素之和大于等于 K | 3092. Most Frequent IDs 最高频率的 ID | 3093. Longest Common Suffix Queries 最长公共后缀查询 | Solution to contest problems 赛题讲解 | Trie 前缀树


Continue reading

Weekly Contest 387 周赛题目解析

Posted on Sun 03 March 2024 in Leetcode • Tagged with Contest

2024-03 Leetcode Weekly Contest 387 第 387 场力扣周赛 | 3069. Distribute Elements Into Two Arrays I 将元素分配到两个数组中 I | 3070. Count Submatrices with Top-Left Element and Sum Less Than k 元素和小于等于 k 的子矩阵的数目 | 3071. Minimum Operations to Write the Letter Y on a Grid 在矩阵上写出字母 Y 所需的最少操作次数 | 3072. Distribute Elements Into Two Arrays II 将元素分配到两个数组中 II | Solution to contest problems 赛题讲解


Continue reading

Weekly Contest 382 周赛题目解析

Posted on Tue 06 February 2024 in Leetcode • Tagged with Contest

2024-01 Leetcode Weekly Contest 382 第 382 场力扣周赛 | 3019. Number of Changing Keys 按键变更的次数 | 3020. Find the Maximum Number of Elements in Subset 子集中元素的最大数量 | 3021. Alice and Bob Playing Flower Game Alice 和 Bob 玩鲜花游戏 | 3022. Minimize OR of Remaining Elements Using Operations 给定操作次数内使剩余元素的或值最小 | Solution to contest problems 赛题讲解


Continue reading

Weekly Contest 381 周赛题目解析

Posted on Wed 31 January 2024 in Leetcode • Tagged with Contest

2024-01 Leetcode Weekly Contest 381 第 381 场力扣周赛 | 3014. Minimum Number of Pushes to Type Word I 输入单词需要的最少按键次数 I | 3015. Count the Number of Houses at a Certain Distance I 按距离统计房屋对数目 I | 3016. Minimum Number of Pushes to Type Word II 输入单词需要的最少按键次数 II | 3017. Count the Number of Houses at a Certain Distance II 按距离统计房屋对数目 II | Solution to contest problems 赛题讲解


Continue reading

Weekly Contest 371 周赛题目解析

Posted on Mon 13 November 2023 in Leetcode • Tagged with Contest

2023-11 Leetcode Weekly Contest 371 第 371 场力扣周赛 | 2932. Maximum Strong Pair XOR I 找出强数对的最大异或值 I | 2933. High-Access Employees 高访问员工 | 2934. Minimum Operations to Maximize Last Elements in Arrays 最大化数组末位元素的最少操作次数 | 2935. Maximum Strong Pair XOR II 找出强数对的最大异或值 II | Solution to contest problems 赛题讲解 | Trie 前缀树 | Greedy 贪心算法


Continue reading

Weekly Contest 367 周赛题目解析

Posted on Sun 15 October 2023 in Leetcode • Tagged with Contest

2023-10 Leetcode Weekly Contest 367 第 367 场力扣周赛 | 2903. Find Indices With Index and Value Difference I 找出满足差值条件的下标 I | 2904. Shortest and Lexicographically Smallest Beautiful String 最短且字典序最小的美丽子字符串 | 2905. Find Indices With Index and Value Difference II 找出满足差值条件的下标 II | 2906. Construct Product Matrix 构造乘积矩阵 | Solution to contest problems 赛题讲解


Continue reading

Weekly Contest 366 周赛题目解析

Posted on Mon 09 October 2023 in Leetcode • Tagged with Contest

2023-10 Leetcode Weekly Contest 366 第 366 场力扣周赛 | 2894. Divisible and Non-divisible Sums Difference 分类求和并作差 | 2895. Minimum Processing Time 最小处理时间 | 2896. Apply Operations to Make Two Strings Equal 执行操作使两个字符串相等 | 2897. Apply Operations on Array to Maximize Sum of Squares 对数组执行操作使平方和最大 | Solution to contest problems 赛题讲解


Continue reading

Weekly Contest 365 周赛题目解析

Posted on Thu 05 October 2023 in Leetcode • Tagged with Contest

2023-10 Leetcode Weekly Contest 365 第 365 场力扣周赛 | 2873. Maximum Value of an Ordered Triplet I 有序三元组中的最大值 I | 2874. Maximum Value of an Ordered Triplet II 有序三元组中的最大值 II | 2875. Minimum Size Subarray in Infinite Array 无限数组的最短子数组 | 2876. Count Visited Nodes in a Directed Graph 有向图访问计数 | Solution to contest problems 赛题讲解


Continue reading

Weekly Contest 364 周赛题目解析

Posted on Sun 01 October 2023 in Leetcode • Tagged with Contest

2023-09 Leetcode Weekly Contest 364 第 364 场力扣周赛 | 2864. Maximum Odd Binary Number 最大二进制奇数 | 2865. Beautiful Towers I 美丽塔 I | 2866. Beautiful Towers II 美丽塔 II | 2867. Count Valid Paths in a Tree 统计树中的合法路径数目 | Solution to contest problems 赛题讲解


Continue reading