ARTS #150 Algorithm 本周选择的算法题是:Convert BST to Greater Tree。 规则 Given the root of a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original ... 2022-04-166 min read
ARTS #149 Algorithm 本周选择的算法题是:Swapping Nodes in a Linked List。 规则 You are given the head of a linked list, and an integer k. Return the head of the linked list after swapping the values of the kth node f... 2022-04-104 min read
ARTS #148 Algorithm 本周选择的算法题是:Next Permutation。 规则 A permutation of an array of integers is an arrangement of its members into a sequence or linear order. For example, for arr = [1,2,3], the following... 2022-04-044 min read
ARTS #147 Algorithm 本周选择的算法题是:Two City Scheduling。 规则 A company is planning to interview 2n people. Given the array costs where costs[i] = [aCosti, bCosti], the cost of flying the ith person to city a is ... 2022-03-266 min read
ARTS #146 Algorithm 本周选择的算法题是:Validate Stack Sequences。 规则 Given two integer arrays pushed and popped each with distinct values, return true if this could have been the result of a sequence of push and po... 2022-03-1910 min read
ARTS #145 Algorithm 本周选择的算法题是:Add Two Numbers。 规则 You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains ... 2022-03-125 min read
ARTS #144 Algorithm 本周选择的算法题是:Is Subsequence。 规则 Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A subsequence of a string is a new string that is formed from the o... 2022-03-053 min read
ARTS #143 Algorithm 本周选择的算法题是:Clone Graph。 规则 Given a reference of a node in a connected undirected graph. Return a deep copy (clone) of the graph. Each node in the graph contains a value (int) and a li... 2022-02-265 min read
OKR 背后的思考框架 说一个我们容易犯的错 — 刚接触 OKR 时,容易把 OKR 写成任务清单。这是绝对错误的,这个阶段要改进的核心不是 OKR 要如何写,而是要明确自己中长期的价值和短期目标。 任务清单的本质问题是想到什么做什么。就像人肉手动的工厂一样,当面对大量订单的时候,一个简单粗暴的方法就是拼命地加人和拼命地工作来换取更大的生产力,只有当人手实在不够或是人力成本高到不可接受的极端情况下,才会去想是不是... 2022-02-254 min read
ARTS #142 Algorithm 本周选择的算法题是:Remove K Digits。 规则 Given string num representing a non-negative integer num, and an integer k, return the smallest possible integer after removing k digits from num. Exampl... 2022-02-194 min read