LeetCode练习
lrr13
.
展开
-
209. 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, ...原创 2020-03-23 21:47:04 · 136 阅读 · 0 评论 -
3.Longest Substring Without Repeating Characters
题目Given a string, find the length of the longest substring without repeating characters.解答使用滑动窗口思想加hastset的结构去解答,实现代码如下:public class Solution { public int lengthOfLongestSubstring(String s) {...原创 2020-03-21 15:04:58 · 146 阅读 · 0 评论