原题链接:https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ class Solution { public int lengthOfLongestSubstring(String s) { ...
分类:
其他好文 时间:
2020-12-25 11:54:02
阅读次数:
0
###题目 1160. Find Words That Can Be Formed by Characters ###解题方法 先把可使用的所有字符放入字典charscount,以“字符:可出现次数”的形式存放,然后遍历words中的每个单词,初始化tempcount字典为charscount的副本 ...
分类:
其他好文 时间:
2020-11-27 11:39:59
阅读次数:
10
Given a string s, find the length of the longest substring without repeating characters. Input: s = "abcabcbb"Output: 3Explanation: The answer is "abc ...
分类:
其他好文 时间:
2020-11-08 17:44:10
阅读次数:
26
###题目 717. 1-bit and 2-bit Characters ###解题方法 将指针设置在第0个位置,当数组长度>1时,如果当前位置是1,就把前两个数pop掉,否则是0的话就把前1个数pop掉,遍历结束看看bits还有没有元素,有的话return True,没有就return Fals ...
分类:
其他好文 时间:
2020-11-04 19:23:49
阅读次数:
36
Given an input string s, reverse the order of the words. A word is defined as a sequence of non-space characters. The words in s will be separated by ...
分类:
其他好文 时间:
2020-10-18 10:19:49
阅读次数:
29
Leetcode.76 Minimum Window Substring Given a string S and a string T, find the minimum window in S which will contain all the characters in T in compl ...
分类:
编程语言 时间:
2020-08-11 15:56:40
阅读次数:
64
R+字符串 prefix(optional) R"delimiter(raw_characters)delimiter" (6) (since C++11) C++11引入了原始字符串格式,用户避免在字符串中加入转移字符\,可以用于表示json字符串等场景 ...
分类:
编程语言 时间:
2020-08-05 22:13:41
阅读次数:
188
URLDecoder对参数进行解码时候,代码如: URLDecoder.decode(param,"utf-8"); 有时候会出现类似如下的错误: URLDecoder异常Illegal hex characters in escape (%) 这是因为传参有一些特殊字符,比如%号或者说+号,导致不 ...
分类:
Web程序 时间:
2020-08-05 19:43:29
阅读次数:
101
Given a string P consisting of only parentheses and asterisk characters (i.e. "(", ")" and ""), you are asked to replace all the asterisk characters i ...
分类:
其他好文 时间:
2020-07-29 12:38:40
阅读次数:
208
Given two strings s1, s2, find the lowest ASCII sum of deleted characters to make two strings equal. Example 1: Input: s1 = "sea", s2 = "eat" Output: ...
分类:
其他好文 时间:
2020-07-28 14:45:21
阅读次数:
310