文章 2017-12-14 来自:开发者社区

[LeetCode] Longest Substring with At Most K Distinct Characters 最多有K个不同字符的最长子串

Given a string, find the length of the longest substring T that contains at most k distinct characters. For example, Given s = “eceba” and k = 2, T is "ece" which its length is 3. ...

文章 2017-12-12 来自:开发者社区

[LeetCode] First Unique Character in a String 字符串第一个不同字符

Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: s = "leetcode" return 0. s = "loveleetcode", return 2. Note: You may ...

文章 2017-12-12 来自:开发者社区

[LeetCode] Longest Substring with At Least K Repeating Characters 至少有K个重复字符的最长子字符串

Find the length of the longest substring T of a given string (consists of lowercase letters only) such that every character in T appears no less than k times. Example 1: ...

文章 2017-12-12 来自:开发者社区

[LeetCode] Longest Repeating Character Replacement 最长重复字符置换

Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Find the length of a longest substring containin...

文章 2017-12-10 来自:开发者社区

[LeetCode] Sort Characters By Frequency 根据字符出现频率排序

Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explanation: 'e' appears twice while 'r' and 't' both appear once. So 'e' m...

文章 2017-12-05 来自:开发者社区

[LeetCode] 1-bit and 2-bit Characters 一位和两位字符

We have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11). Now given a string represented by se...

文章 2017-11-30 来自:开发者社区

[LeetCode]1-bit and 2-bit Characters 1位和2位字符

链接:https://leetcode.com/problems/1-bit-and-2-bit-characters/description/难度:Easy题目:717. 1-bit and 2-bit We have two special characters. The first character can be represented by one bit 0. The second ....

文章 2015-12-27 来自:开发者社区

LeetCode: 3_Longest Substring Without Repeating Characters | 求没有重复字符的最长子串的长度 | Medium

题目: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3.....

文章 2015-09-21 来自:开发者社区

[LeetCode] Isomorphic Strings - 字符串操作:数组计数字符个数问题

题目概述: Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be replaced with ano....

文章 2015-09-09 来自:开发者社区

[LeetCode] Plus One - 整数字符转换相加

题目概述:Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list.题目解析:给你一个int型数组存储一个非负....

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。