随笔分类 - LeetCode
摘要:S and T are strings composed of lowercase letters. In S, no letter occurs more than once. S was sorted in some custom order previously. We want to per
阅读全文
摘要:题目比较简单,实现一个复数乘法,输入输出都要求为字符串形式 大部分时间都花在写正则匹配实部和虚部了 两个复数 $a + bi$, $c + di$ $(a + bi) (c + di) = (ac bd) + (bc + ad)i$ 使用三个辅助变量 $$\begin{cases} t_1 = (a
阅读全文
摘要:Description International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: "a" maps to "
阅读全文
摘要:Description In a 2 dimensional array grid, each value grid[i][j] represents the height of a building located there. We are allowed to increase the hei
阅读全文