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