ARTS #141 Algorithm 本周选择的算法题是:Pairs of Songs With Total Durations Divisible by 60。 规则 You are given a list of songs where the ith song has a duration of time[i] seconds. Return the number of pairs of son...
ARTS #140 Algorithm 本周选择的算法题是:Running Sum of 1d Array。 规则 Given an array nums. We define a running sum of an array as runningSum[i] = sum(nums[0]…nums[i]). Return the running sum of nums. Example 1: In...
记录我的 2021 前言 2021 年大体可以分为三部分来总结: 学习 阅读 生活 学习部分主要是 ARTS、LeetCode、工作思考和一些打卡事项;阅读部分是由于今年读了15本书,想单独拿一章出来总结;生活部分就是一些日常琐事了。 学习 ARTS 今年写了 52 期,ARTS 共完成了 134 期,回想 ARTS 的初衷有两个原因: 了解业界的发展趋势 提高成长的...
ARTS #139 Algorithm 本周选择的算法题是:Detect Capital。 规则 We define the usage of capitals in a word to be right when one of the following cases holds: All letters in this word are capitals, like "USA". All l...
ARTS #138 Algorithm 本周选择的算法题是:Reverse Nodes in k-Group。 规则 Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list. k is a positive integer and is less th...
ARTS #137 Algorithm 本周选择的算法题是:Serialize and Deserialize Binary Tree。 规则 Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or ...
ARTS #136 Algorithm 本周选择的算法题是:Concatenation of Array。 规则 Given an integer array nums of length n, you want to create an array ans of length 2n where ans[i] == nums[i] and ans[i + n] == nums[i] for 0 <=...
ARTS #135 Algorithm 本周选择的算法题是:Cherry Pickup II。 规则 You are given a rows x cols matrix grid representing a field of cherries where grid[i][j] represents the number of cherries that you can collect from the...
ARTS #134 Algorithm 本周选择的算法题是:Simplify Path。 规则 Given a string path, which is an absolute path (starting with a slash '/') to a file or directory in a Unix-style file system, convert it to the simplified ...
ARTS #133 Algorithm 本周选择的算法题是:Combinations。 规则 Given two integers n and k, return all possible combinations of k numbers out of the range [1, n]. You may return the answer in any order. Example 1: Inpu...