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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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 [
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号