【Leetcode题解】Biweekly Contest 103 双周赛题目解析

Posted on Mon 01 May 2023 in Leetcode • Tagged with Contest

2023-04 Leetcode Biweekly Contest 103 | 2656. Maximum Sum With Exactly K Elements K 个元素的最大和 | 2657. Find the Prefix Common Array of Two Arrays 找到两个数组的前缀公共数组 | 2658. Maximum Number of Fish in a Grid 网格图中鱼的最大数目 | 2659. Make Array Empty 将数组清空 | Solution to contest problems 赛题讲解 | DFS 深度优先搜索


Continue reading

【Leetcode题解】Weekly Contest 342 周赛题目解析

Posted on Sun 23 April 2023 in Leetcode • Tagged with Contest

2023-04 Leetcode Weekly Contest 342 第 342 场力扣周赛 | 2651. Calculate Delayed Arrival Time 计算列车到站时间 | 2652. Sum Multiples 倍数求和 | 2653. Sliding Subarray Beauty 滑动子数组的美丽值 | 2654. Minimum Number of Operations to Make All Array Elements Equal to 1 使数组所有元素变成 1 的最少操作次数 | Solution to contest problems 赛题讲解 | 快速选择 Quickselect | DFS | 最大公约数 Greatest Common Divisor


Continue reading

【Leetcode题解】Weekly Contest 341 周赛题目解析

Posted on Wed 19 April 2023 in Leetcode • Tagged with Contest

2023-04 Leetcode Weekly Contest 341 第 341 场力扣周赛 | 2643. Row With Maximum Ones 一最多的行 | 2644. Find the Maximum Divisibility Score 找出可整除性得分最大的整数 | 2645. Minimum Additions to Make Valid String 构造有效字符串的最少插入数 | 2646. Minimize the Total Price of the Trips 最小化旅行的价格总和 | Solution to contest problems 赛题讲解 | 状态机 State Machine | 树 Tree | Depth First Search | 最近公共祖先 Lowest Common Ancestor


Continue reading

【Leetcode题解】Biweekly Contest 102 双周赛题目解析

Posted on Sun 16 April 2023 in Leetcode • Tagged with Contest

2023-04 Leetcode Biweekly Contest 102 | 2639. Find the Width of Columns of a Grid 查询网格图中每一列的宽度 | 2640. Find the Score of All Prefixes of an Array 一个数组所有前缀的分数 | 2641. Cousins in Binary Tree II 使子数组元素和相等 | 2642. Design Graph With Shortest Path Calculator 设计可以求最短路径的图类 | Solution to contest problems 赛题讲解 | Prefix Sum 前缀和 | BFS 广度优先搜索 | Dijkstra's Algorithm 狄克斯特拉算法 | Floyd-Warshall's Algorithm 算法 | Bianry Tree Traversal 二叉树的遍历


Continue reading

【Leetcode题解】Weekly Contest 340 周赛题目解析

Posted on Sun 09 April 2023 in Leetcode • Tagged with Contest

2023-04 Leetcode Weekly Contest 340 第 340 场力扣周赛 | 2614. Prime In Diagonal 对角线上的质数 | 2615. Sum of Distances 等值距离和 | 2616. Minimize the Maximum Difference of Pairs 最小化数对的最大差值 | 2617. Minimum Number of Visited Cells in a Grid 网格图中最少访问的格子数 | Solution to contest problems 赛题讲解 | Prefix Sum 前缀和 | Binary Search 二分搜索 | BFS 广度优先搜索


Continue reading

【Leetcode题解】Weekly Contest 339 周赛题目解析

Posted on Sun 02 April 2023 in Leetcode • Tagged with Contest

2023-04 Leetcode Weekly Contest 339 | 2600. K Items With the Maximum Sum K 件物品的最大和 | 2610. Convert an Array Into a 2D Array With Conditions 转换二维数组 | 2611. Mice and Cheese 老鼠和奶酪 | 2612. Minimum Reverse Operations 最少翻转操作数| My solution 我的题目解析


Continue reading

【Leetcode题解】Biweekly Contest 101 双周赛题目解析

Posted on Sun 02 April 2023 in Leetcode • Tagged with Contest

2023-04 Leetcode Biweekly Contest 101 | 2605. Form Smallest Number From Two Digit Arrays 从两个数字数组里生成最小数字 | 2606. Find the Substring With Maximum Cost 找到最大开销的子字符串 | 2607. Make K-Subarray Sums Equal 使子数组元素和相等 | 2608. Shortest Cycle in a Graph 图中的最短环 | My solution 我的题目解析


Continue reading

【Leetcode题解】Weekly Contest 338 周赛题目解析

Posted on Mon 27 March 2023 in Leetcode • Tagged with Contest

2023-03 Leetcode Weekly Contest 338 | 2600. K Items With the Maximum Sum K 件物品的最大和 | 2601. Prime Subtraction Operation 质数减法运算 | 2602. Minimum Operations to Make All Array Elements Equal 使数组元素全部相等的最少操作次数 | 2603. Collect Coins in a Tree 收集树中金币| My solution 我的题目解析


Continue reading

【Leetcode题解】Weekly Contest 337 周赛题目解析

Posted on Sun 19 March 2023 in Leetcode • Tagged with Contest

2023-03 Leetcode Weekly Contest 337 | 2595. Number of Even and Odd Bits | 2596. Check Knight Tour Configuration | 2597. The Number of Beautiful Subsets | 2598. Smallest Missing Non-negative Integer After Operations | My solution 我的题目解析


Continue reading

【Leetcode题解】Biweekly Contest 100 双周赛题目解析

Posted on Sat 18 March 2023 in Leetcode • Tagged with Contest

2023-03 Leetcode Biweekly Contest 100 | 2591. Distribute Money to Maximum Children | 2592. Maximize Greatness of an Array | 2593. Find Score of an Array After Marking All Elements | 2594. Minimum Time to Repair Cars | My solution 我的题目解析


Continue reading