ARTS #88 Algorithm 本周选择的算法题是:Substring with Concatenation of All Words。 规则 You are given a string s and an array of strings words of the same length. Return all starting indices of substring(s) in s that...
ARTS #87 Algorithm 本周选择的算法题是:Set Matrix Zeroes。 规则 Given an m x n matrix. If an element is 0, set its entire row and column to 0. Do it in-place. Follow up: A straight forward solution using O(m**n)...
博客性能优化 上次将博客托管到 Vercel 之后访问速度有了很大改善,于是就想深入做一些优化,这是本次优化过后 LightHouse 的评分: 除了性能改善,还修复了所有的 Accessibility 问题,我希望能最终构建出一个美观、简单、对 SEO 友好且快速的博客,下面就来说说本次优化的具体内容。 字体瘦身 图标库采用了 FontAwesome 5,完整的 FontAwesome 尺寸很...
ARTS #86 Algorithm 本周选择的算法题是:Minimum Path Sum。 规则 Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. N...
ARTS #85 Algorithm 本周选择的算法题是:Determine the Order。 规则 The Robots have found an encrypted message. We cannot decrypt it at the moment, but we can take the first steps towards doing so. You have a set of “w...
尝试 Vercel 最近在手机上访问 GitHub Page 时遇到完全打不开的情况,感觉已经无法忍受了。 上次尝试将 Jekyll 静态生成的内容同步到 Netlify 上,但没有取得太好的效果: 于是就想重新找个镜像站点,发现了 Vercel,部署好后效果很明显: Vercel 也是一个静态网站托管平台,支持 GitHub、GitLab、Bitbucket 以及一键导入,使用上和 Netlif...
ARTS #84 Algorithm 本周选择的算法题是:Search a 2D Matrix 规则 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted...
建立可评估工作流 最近在看《演进式架构》这本书,从中得到了一些关于如何做好质量保障这件事的启发。 质量是所有人都关心的事 团队的组织架构决定了团队的分工模式,也间接决定了从属不同团队的组件所采用的架构,如果我们在系统立项之初,就构建与目标系统相仿的团队结构,无疑会使项目更容易实现。如果现实并非如此呢?由于人们很难改变其职责范围外的事情,所以软件架构师需要时刻关注团队的分工模式,从而使架构目标和团队结构保持...
ARTS #83 Algorithm 本周选择的算法题是:Rotate List 规则 Given the head of a linked list, rotate the list to the right by k places. Example 1: Input: head = [1,2,3,4,5], k = 2 Output: [4,5,1,2,3] Example 2: ...
《演进式架构》书评 《演进式架构》通篇只讲了一件事:构建可评估架构的重要性。 稍具规模的产品往往都是由不同团队协作完成的,团队之间会划分职责和关键需求,由关键需求定义架构的关键指标,不可避免的产生了团队之间目标不一致的事实。 在团队编制下,各个团队通常都会针对眼前的任务优化效率,而不是针对那些更抽象的战略业务目标(特别是有工期压力时),这会导致各团队往往专注于交付各自的组件,而不关注端到端的特性价值,导致这...