码迷,mamicode.com
首页 >  
搜索关键字:characters    ( 2378个结果
3. 无重复字符的最长子串
原题链接:https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ class Solution { public int lengthOfLongestSubstring(String s) { ...
分类:其他好文   时间:2020-12-25 11:54:02    阅读次数:0
LeetCode #1160. Find Words That Can Be Formed by Characters
###题目 1160. Find Words That Can Be Formed by Characters ###解题方法 先把可使用的所有字符放入字典charscount,以“字符:可出现次数”的形式存放,然后遍历words中的每个单词,初始化tempcount字典为charscount的副本 ...
分类:其他好文   时间:2020-11-27 11:39:59    阅读次数:10
3. 无重复字符的最长子串 Longest Substring Without Repeating Characters
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
LeetCode #717. 1-bit and 2-bit Characters
###题目 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
151. Reverse Words in a String翻转一句话中的单词
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 (Java)
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
c++11 R+字符串
R+字符串 prefix(optional) R"delimiter(raw_characters)delimiter" (6) (since C++11) C++11引入了原始字符串格式,用户避免在字符串中加入转移字符\,可以用于表示json字符串等场景 ...
分类:编程语言   时间:2020-08-05 22:13:41    阅读次数:188
URLDecoder异常解决方法
URLDecoder对参数进行解码时候,代码如: URLDecoder.decode(param,"utf-8"); 有时候会出现类似如下的错误: URLDecoder异常Illegal hex characters in escape (%) 这是因为传参有一些特殊字符,比如%号或者说+号,导致不 ...
分类:Web程序   时间:2020-08-05 19:43:29    阅读次数:101
HDU6799 Parentheses Matching(贪心/括号匹配)
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
712. Minimum ASCII Delete Sum for Two Strings
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
2378条   上一页 1 2 3 4 5 ... 238 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!