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...
ARTS #132 Algorithm 本周选择的算法题是:Minimum Number of Operations to Move All Balls to Each Box。 规则 You have n boxes. You are given a binary string boxes of length n, where boxes[i] is '0' if the ith box is empt...
ARTS #131 Algorithm 本周选择的算法题是:Partitioning Into Minimum Number Of Deci-Binary Numbers。 规则 A decimal number is called deci-binary if each of its digits is either 0 or 1 without any leading zeros. For examp...
重视「重要不紧急的」事情 从时间管理角度上看,我们一般会把事情按照四象限法则分为重要紧急的、重要不紧急的、不重要紧急的、不重要不紧急的,而其中最重要的部分可能是 — 重要不紧急的。 为什么说重要不紧急的是最重要的呢?我们可以简单分析下: 重要且紧急的 — 简称救火。传统观念认为要立刻处理,这没有错,但是如果这类事件太多,一定需要思考为什么会有那么多救火的事情,多数原因是没做好规划 重要但不紧急 — 我称...