- 博客(2)
- 收藏
- 关注
原创 Binary Subarrays With Sum
In an array A of 0s and 1s, how many non-empty subarrays have sum S? Example 1: Input: A = [1,0,1,0,1], S = 2 Output: 4 Explanation: The 4 subarrays are bolded below: [1,0,1,0,1] [1,0,1,0,1] [1...
2018-11-28 21:50:21 174
原创 Minimum Add to Make Parentheses Valid
Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', and in any positions ) so that the resulting parentheses string is valid. Formally, a parentheses s...
2018-11-28 21:43:30 150
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人