07 2019 档案
摘要:Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and is able to see the 10 most recent tweets in the u
阅读全文
posted @ 2019-07-21 15:52
fatttcat
摘要:A string S represents a list of words. Each letter in the word has 1 or more options. If there is one option, the letter is represented as is. If ther
阅读全文
posted @ 2019-07-21 08:29
fatttcat
摘要:We are given two arrays A and B of words. Each word is a string of lowercase letters. Now, say that word b is a subset of word a if every letter in b
阅读全文
posted @ 2019-07-20 15:47
fatttcat
摘要:Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible stri
阅读全文
posted @ 2019-07-20 12:13
fatttcat
摘要:We have a collection of rocks, each rock has a positive integer weight. Each turn, we choose the two heaviest rocks and smash them together. Suppose t
阅读全文
posted @ 2019-07-13 09:27
fatttcat
摘要:We have a list of points on the plane. Find the K closest points to the origin (0, 0). (Here, the distance between two points on a plane is the Euclid
阅读全文
posted @ 2019-07-13 08:06
fatttcat
摘要:A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possibl
阅读全文
posted @ 2019-07-10 04:22
fatttcat
摘要:In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1. Two nodes of a binary tree are cousins if they have
阅读全文
posted @ 2019-07-09 09:15
fatttcat
摘要:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: No
阅读全文
posted @ 2019-07-04 15:35
fatttcat