記錄: 2017/7

0

Minimum Size Subarray Sum

Minimum Size Subarray SumGiven an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn’t one, return 0 instead. F

0

Implement Trie (Prefix Tree)

Implement Trie (Prefix Tree)Implement a trie with insert, search, and startsWith methods. Note: You may assume that all inputs are consist of lowercase letters a-z. 提示 解題應用 Trie Tree Defaul

0

Course Schedule

Course ScheduleThere are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is ex

0

Bitwise AND of Numbers Range

Bitwise AND of Numbers RangeGiven a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. For example, given the range [5, 7], you sho

0

Number of Islands

Number of IslandsGiven a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertical