ARTS #185 | 圣诞展览 Algorithm 本周选择的算法题是:Walking Robot Simulation II。 规则 A width x height grid is on an XY-plane with the bottom-left cell at (0, 0) and the top-right cell at (width - 1, height - 1). The grid is a... 2022-12-2515 min read
ARTS #184 | 以后就是四口之家了 Algorithm 本周选择的算法题是:Maximum Difference Between Node and Ancestor。 规则 Given the root of a binary tree, find the maximum value v for which there exist different nodes a and b where v = |a.val - b.... 2022-12-163 min read
ARTS #183 Algorithm 本周选择的算法题是:Minimum Average Difference。 规则 You are given a 0-indexed integer array nums of length n. The average difference of the index i is the absolute difference between the average... 2022-12-0410 min read
ARTS #182 Algorithm 本周选择的算法题是:Maximum Profit in Job Scheduling。 规则 We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i]. You’re given t... 2022-11-275 min read
ARTS #181 Algorithm 本周选择的算法题是:Ugly Number。 规则 An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5. Given an integer n, return true if n is an ugly number. Example 1: Inp... 2022-11-204 min read
ARTS #180 Algorithm 本周选择的算法题是:Maximum 69 Number。 规则 You are given a positive integer num consisting only of digits 6 and 9. Return the maximum number you can get by changing at most one digit (6 becomes ... 2022-11-133 min read
ARTS #179 Algorithm 本周选择的算法题是:Orderly Queue。 规则 You are given a string s and an integer k. You can choose one of the first k letters of s and append it at the end of the string.. Return the lexicographic... 2022-11-068 min read
ARTS #178 Algorithm 本周选择的算法题是:Earliest Possible Day of Full Bloom。 规则 You have n flower seeds. Every seed must be planted first before it can begin to grow, then bloom. Planting a seed takes time and so d... 2022-10-3012 min read
ARTS #177 Algorithm 本周选择的算法题是:Set Mismatch。 规则 You have a set of integers s, which originally contains all the numbers from 1 to n. Unfortunately, due to some error, one of the numbers in s got duplicated... 2022-10-233 min read
ARTS #176 Algorithm 本周选择的题是:Duplicate Emails。 规则 Write an SQL query to report all the duplicate emails. Return the result table in any order. The query result format is in the following example. Soluti... 2022-10-162 min read