02 2019 档案

摘要:On a N x N grid of cells, each cell (x, y) with 0 <= x < N and 0 <= y < N has a lamp. Initially, some number of lamps are on. lamps[i] tells us the lo 阅读全文
posted @ 2019-02-26 12:38 Review->Improve 阅读(626) 评论(0) 推荐(0)
摘要:In an array A containing only 0s and 1s, a K-bit flip consists of choosing a (contiguous) subarray of length K and simultaneously changing every 0 in 阅读全文
posted @ 2019-02-19 07:13 Review->Improve 阅读(1519) 评论(0) 推荐(0)
摘要:Consider all the leaves of a binary tree. From left to right order, the values of those leaves form a leaf value sequence. For example, in the given t 阅读全文
posted @ 2019-02-13 22:57 Review->Improve 阅读(186) 评论(0) 推荐(0)
摘要:This problem was asked by Google. In a directed graph, each node is assigned an uppercase letter. We define a path's value as the number of most frequ 阅读全文
posted @ 2019-02-12 13:00 Review->Improve 阅读(3896) 评论(0) 推荐(0)
摘要:For a non-negative integer X, the array-form of X is an array of its digits in left to right order. For example, if X = 1231, then the array form is [ 阅读全文
posted @ 2019-02-11 07:07 Review->Improve 阅读(843) 评论(0) 推荐(0)
摘要:Given a binary tree, return the vertical order traversal of its nodes values. For each node at position (X, Y), its left and right children respective 阅读全文
posted @ 2019-02-10 10:20 Review->Improve 阅读(901) 评论(0) 推荐(0)
摘要:Given two integers A and B, return any string S such that: S has length A + B and contains exactly A 'a' letters, and exactly B 'b' letters; The subst 阅读全文
posted @ 2019-02-10 02:08 Review->Improve 阅读(573) 评论(0) 推荐(0)
摘要:This problem was asked by Microsoft. A number is considered perfect if its digits sum up to exactly 10. Given a positive integer n, return the n-th pe 阅读全文
posted @ 2019-02-06 01:14 Review->Improve 阅读(215) 评论(0) 推荐(0)
摘要:Given the root of a binary tree, each node has a value from 0 to 25 representing the letters 'a' to 'z': a value of 0 represents 'a', a value of 1 rep 阅读全文
posted @ 2019-02-05 12:48 Review->Improve 阅读(632) 评论(0) 推荐(0)
摘要:This problem was asked by Google. On our special chessboard, two bishops attack each other if they share the same diagonal. This includes bishops that 阅读全文
posted @ 2019-02-05 02:51 Review->Improve 阅读(1951) 评论(0) 推荐(0)