- 博客(4)
- 资源 (1)
- 收藏
- 关注
原创 Rotate Array
Given an array, rotate the array to the right by k steps, where k is non-negative.Example 1:Input: [1,2,3,4,5,6,7] and k = 3Output: [5,6,7,1,2,3,4]Explanation:rotate 1 steps to the right: [7,1,2,...
2019-05-27 21:53:01 119
原创 Minimum Size Subarray Sum
Given 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.Example:Input: s = 7, nums...
2019-05-27 16:43:56 110
原创 Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string “”.Example 1:Input: [“flower”,“flow”,“flight”]Output: “fl...
2019-05-27 14:57:57 108
原创 Add Binary
Given two binary strings, return their sum (also a binary string).The input strings are both non-empty and contains only characters 1 or 0.Example 1:Input: a = “11”, b = “1”Output: “100”Example 2...
2019-05-27 14:48:01 132
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人