07 2019 档案

摘要:Given an array of integers arr, find the sum of min(b), where b ranges over every (contiguous) subarray of arr. Since the answer may be large, return 阅读全文
posted @ 2019-07-30 22:53 Grandyang 阅读(6768) 评论(2) 推荐(0) 编辑
摘要:We are given a 2-dimensional grid. "." is an empty cell, "#" is a wall, "@" is the starting point, ("a", "b", ...) are keys, and ("A", "B", ...) are l 阅读全文
posted @ 2019-07-20 23:27 Grandyang 阅读(2840) 评论(3) 推荐(0) 编辑
摘要:Let's say a positive integer is a *superpalindrome* if it is a palindrome, and it is also the square of a palindrome. Now, given two positive integers 阅读全文
posted @ 2019-07-17 23:49 Grandyang 阅读(2241) 评论(2) 推荐(0) 编辑
摘要:A car travels from a starting position to a destination which is miles east of the starting position. Along the way, there are gas stations. Each repr 阅读全文
posted @ 2019-07-14 23:58 Grandyang 阅读(3226) 评论(0) 推荐(2) 编辑
摘要:Given an array of non negative integers, return an array consisting of all the even elements of , followed by all the odd elements of . You may return 阅读全文
posted @ 2019-07-11 23:32 Grandyang 阅读(4921) 评论(0) 推荐(0) 编辑
摘要:We run a preorder depth first search on the rootof a binary tree. At each node in this traversal, we output D dashes (where D is the depth of this nod 阅读全文
posted @ 2019-07-08 08:22 Grandyang 阅读(1738) 评论(0) 推荐(0) 编辑
摘要:A positive integer is magical if it is divisible by either A or B. Return the N th magical number. Since the answer may be very large, return it modul 阅读全文
posted @ 2019-07-07 23:49 Grandyang 阅读(2608) 评论(0) 推荐(1) 编辑
摘要:In a row of trees, the th tree produces fruit with type . You start at any tree of your choice, then repeatedly perform the following steps: 1. Add on 阅读全文
posted @ 2019-07-03 23:45 Grandyang 阅读(6074) 评论(0) 推荐(0) 编辑

Fork me on GitHub