ARTS #60 Algorithm 本周选择的算法题是:Implement strStr() 规则如下: Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Input: hay... 2020-07-257 min read
ARTS #59 Algorithm 本周选择的算法题是:Median of Two Sorted Arrays 规则如下: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time co... 2020-07-187 min read
软件架构设计 架构设计能力,因掌握起来困难而显得珍贵。 这是对《软件架构设计》的读后感,看完这本书让我知道:我不是一名合格的架构师。我目前的职责“基础组件的开发和设计”、“已有代码的优化 & 重构”仍然没有跳出开发者的视角,架构师当然也要写代码、了解业务,但不能仅限于此,要深挖产品需求、掌握架构设计的方法、完整的领域知识和技术的实现细节。 从本书描述的架构角色来看,我的职责更侧重于系统... 2020-07-151 min read
ARTS #58 Algorithm 本周选择的算法题是:Goat Latin 规则如下: A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to convert the sente... 2020-07-114 min read
Swift 内存管理 从编译器的视角看 Swift 的内存管理 思维导图: xmind 文字资料 Swift 4- ARC 原理 在 SIL 阶段插入 swift_retain()、 swift_release() 完成内存管理 weak 引用会转换成 swift_weakAssign() unowned 引用会转换成 unowned_... 2020-07-102 min read
DNS 的用武之地 DNS 除了做域名解析,还能干啥 思维导图: xmind 文字资料 域名解析 通过 DNS 服务器返回对应的 IP 地址 智能 DNS 资源的就近访问 根据用户 IP 返回最近的服务器地址 实现方式 ... 2020-07-091 min read
ARTS #57 Algorithm 本周选择的算法题是:Kth Smallest Element in a Sorted Matrix 规则如下: Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matr... 2020-07-049 min read
ARTS #56 Algorithm 本周选择的算法题是:字符串的排列 规则如下: 输入一个字符串,打印出该字符串中字符的所有排列。 你可以以任意顺序返回这个字符串数组,但里面不能有重复元素。 示例: 输入:s = "abc" 输出:["abc","acb","bac","bca","cab","cba"] 限制: 1 <= s 的长度 <= 8 Solution Runt... 2020-06-272 min read
ARTS #55 Algorithm 本周选择的算法题是:Construct Binary Tree from Preorder and Inorder Traversal 规则如下: Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicat... 2020-06-202 min read
ARTS #54 Algorithm 本周选择的算法题是:Climbing Stairs 规则如下: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cli... 2020-06-133 min read