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
ARTS #53 Algorithm 本周选择的算法题是:Best Time to Buy and Sell Stock II 规则如下: Say you have an array prices for which the ith element is the price of a given stock on day i. Design an algorithm to find the maxim... 2020-06-063 min read
ARTS #52 Algorithm 本周选择的算法题是:Search a 2D Matrix II 规则如下: 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 ... 2020-05-304 min read
ARTS #51 Algorithm 本周选择的算法题是:Maximum Number of Occurrences of a Substring 规则如下: Given a string s, return the maximum number of ocurrences of any substring under the following rules: The number of uni... 2020-05-235 min read
ARTS #50 Algorithm 本周选择的算法题是:Word Search II 规则如下: Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequentially adjace... 2020-05-167 min read