2023 春节记忆 老家的雪在年三十前就铺满了大地,而在厦门这座南方小城,却百花齐放、暖阳高照。 今年因为小宝宝出生,连续两年没回老家,由于无人带娃,年的记忆就和家里的大宝小宝们交织在一起。 压岁钱 不得不说,现在的红包是越来越好看了: 我小时候可收不到这么好看(长)的红包😌 压岁钱的寓意是辟邪驱鬼,帮助小孩平安过年,并祝愿他们能够在新的一年里平平安安。我家大宝理解了这份寓意,给我们制作了一个...
ARTS #188 | 新年快乐 Algorithm 本周选择的算法题是:Subarray Sums Divisible by K。 规则 Given an integer array nums and an integer k, return the number of non-empty subarrays that have a sum divisible by k. A subarray is a con...
ARTS #187 | 喂天鹅 Algorithm 本周选择的算法题是:Longest Path With Different Adjacent Characters。 规则 You are given a tree (i.e. a connected, undirected graph that has no cycles) rooted at node 0 consisting of n nodes numb...
ARTS #186 | 阳康了 Algorithm 本周选择的算法题是:Maximum Ice Cream Bars。 规则 It is a sweltering summer day, and a boy wants to buy some ice cream bars. At the store, there are n ice cream bars. You are given an array cost...
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...
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....
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...
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...
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...
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 ...