984. String Without AAA or BBB Given two integers A and B, return any string S such that: S has length A + B and contains exactly A 'a' letters, and e ...
分类:
其他好文 时间:
2019-01-27 16:24:44
阅读次数:
128
Two people are playing a game with a string ss, consisting of lowercase latin letters. On a player's turn, he should choose two consecutive equal lett ...
分类:
其他好文 时间:
2019-01-23 10:39:52
阅读次数:
195
A string S of lowercase letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most one p ...
分类:
其他好文 时间:
2019-01-10 21:51:05
阅读次数:
172
Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower case English letters in both sand t. t is pot ...
分类:
其他好文 时间:
2019-01-09 18:49:23
阅读次数:
188
import string# dt = string.digits # 获取0-9的数字# dt = string.ascii_letters # 获取所有的大小写字母# dt = string.hexdigits # 获取十六进制# dt = string.ascii_letters # 获取小写 ...
分类:
其他好文 时间:
2019-01-05 19:43:24
阅读次数:
172
给若干个模式串,以及若干个句子,判断每个句子里是否包含模式串。 句子和模式串都由小写字母组成 ...
分类:
其他好文 时间:
2019-01-05 13:40:07
阅读次数:
174
题意 给你一个长为 $n$ 的串,字符集为 $a,b,c,d,e,f$ 。你可以将整个串打乱之后重新放置,但是某些位置上有一些限制:必须放某个字符集的字符。问字典序最小的串,如果无解输出 "Impossible"。 $n\le 10^5$ 分析 每次贪心地选择字典序最小的字符判断,判断后面是否可以完 ...
分类:
其他好文 时间:
2019-01-05 12:11:07
阅读次数:
218
Problem: Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequenti ...
分类:
其他好文 时间:
2019-01-01 11:06:17
阅读次数:
133
Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your ...
分类:
其他好文 时间:
2018-12-31 21:09:19
阅读次数:
137
Problem: This problem is an interactive problem new to the LeetCode platform. We are given a word list of unique words, each word is 6 letters long, a ...
分类:
其他好文 时间:
2018-12-31 19:11:50
阅读次数:
163