08 2019 档案

摘要:In an election, the th vote was cast for at time . Now, we would like to implement the following query function: will return the number of the person 阅读全文
posted @ 2019-08-27 23:48 Grandyang 阅读(2195) 评论(0) 推荐(0) 编辑
摘要:An undirected, connected graph of N nodes (labeled 0, 1, 2, ..., N-1) is given as graph. graph.length = N, and j != i is in the list graph[i] exactly 阅读全文
posted @ 2019-08-25 23:37 Grandyang 阅读(4078) 评论(2) 推荐(1) 编辑
摘要:Given a rooted binary tree, return the lowest common ancestor of its deepest leaves. Recall that: The node of a binary tree is a leaf if and only if i 阅读全文
posted @ 2019-08-22 22:39 Grandyang 阅读(3003) 评论(0) 推荐(0) 编辑
摘要:We are given a list of (axis aligned) . Each , where (x1, y1) are the coordinates of the bottom left corner, and (x2, y2) are the coordinates of the t 阅读全文
posted @ 2019-08-18 02:56 Grandyang 阅读(4739) 评论(0) 推荐(3) 编辑
摘要:Given an array A of integers, for each integer A[i] we need to choose either x = -K or x = K, and add x to A[i] (only once). After this process, we ha 阅读全文
posted @ 2019-08-15 23:29 Grandyang 阅读(3203) 评论(2) 推荐(0) 编辑
摘要:Strings and are similar (for some non negative integer ) if we can swap the positions of two letters in exactly times so that the resulting string equ 阅读全文
posted @ 2019-08-13 02:37 Grandyang 阅读(3542) 评论(2) 推荐(0) 编辑
摘要:On an N x N , the numbers from to are written boustrophedonically starting from the bottom left of the board, and alternating direction each row. For 阅读全文
posted @ 2019-08-12 21:16 Grandyang 阅读(4361) 评论(4) 推荐(0) 编辑
摘要:There are workers. The th worker has a and a minimum wage expectation . Now we want to hire exactly workers to form a paid group . When hiring a group 阅读全文
posted @ 2019-08-09 20:34 Grandyang 阅读(3202) 评论(0) 推荐(1) 编辑
摘要:Given an array of integers, for each integer we may choose any with ` K 这道题说是给了一个非负数的数组,和一个非负数K,说是数组中的每一个数字都可以加上 [ K, K] 范围内的任意一个数字,问新数组的最大值最小值之间的差值最小 阅读全文
posted @ 2019-08-07 22:20 Grandyang 阅读(2119) 评论(0) 推荐(0) 编辑
摘要:Return the length of the shortest, non-empty, contiguous subarray of A with sum at least K. If there is no non-empty subarray with sum at least K, ret 阅读全文
posted @ 2019-08-04 22:01 Grandyang 阅读(6160) 评论(4) 推荐(1) 编辑

Fork me on GitHub