06 2018 档案

摘要:We are given an array A of positive integers, and two positive integers L and R (L <= R). Return the number of (contiguous, non-empty) subarrays such 阅读全文
posted @ 2018-06-28 11:47 Grandyang 阅读(3529) 评论(2) 推荐(1) 编辑
摘要:A Tic-Tac-Toe board is given as a string array board. Return True if and only if it is possible to reach this board position during the course of a va 阅读全文
posted @ 2018-06-25 10:21 Grandyang 阅读(5158) 评论(1) 推荐(1) 编辑
摘要:Let f(x) be the number of zeroes at the end of x!. (Recall that x! = 1 * 2 * 3 * ... * x, and by convention, 0! = 1.) For example, f(3) = 0 because 3! 阅读全文
posted @ 2018-06-22 16:15 Grandyang 阅读(2962) 评论(7) 推荐(1) 编辑
摘要:Given a string s and an array of strings words, return the number of words[i] that is a subsequence of s. A subsequence of a string is a new string ge 阅读全文
posted @ 2018-06-19 21:53 Grandyang 阅读(6980) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-06-16 11:13 Grandyang 阅读(7804) 评论(0) 推荐(0) 编辑
摘要:You have two types of tiles: a 2 x 1 domino shape and a tromino shape. You may rotate these shapes. Given an integer n, return the number of ways to t 阅读全文
posted @ 2018-06-13 19:58 Grandyang 阅读(5885) 评论(1) 推荐(0) 编辑
摘要:You are playing a simplified Pacman game. You start at the point (0, 0), and your destination is (target[0], target[1]). There are several ghosts on t 阅读全文
posted @ 2018-06-11 08:00 Grandyang 阅读(2925) 评论(2) 推荐(0) 编辑
摘要:X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotate 阅读全文
posted @ 2018-06-08 11:56 Grandyang 阅读(5458) 评论(3) 推荐(0) 编辑
摘要:Vim是公认的终端编辑神器,配置文件设置的好,再加上各种功能的插件,更能使其如虎添翼,下面就分享出博主的配置文件,也是从网上大神那里拷过来的。配置文件在用户目录下~/.vimrc ,如果没有,就自己创建一个。 安装插件管家Vundle: 然后再建立一个插件的文件,如果没有,就创建一个 ~/.vimr 阅读全文
posted @ 2018-06-06 07:19 Grandyang 阅读(5283) 评论(1) 推荐(0) 编辑
摘要:A sorted list A contains 1, plus some number of primes. Then, for every p < q in the list, we consider the fraction p/q. What is the K-th smallest fra 阅读全文
posted @ 2018-06-04 19:59 Grandyang 阅读(4740) 评论(3) 推荐(0) 编辑

Fork me on GitHub