07 2018 档案
摘要:Description Given a non empty, singly linked list with head node , return a middle node of linked list. If there are two middle nodes, return the seco
阅读全文
摘要:The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul
阅读全文
摘要:Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex
阅读全文
摘要:Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when one of
阅读全文
摘要: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
阅读全文