Given a string S, find the longest palindromic substring in S. You may assume that the maximum length o…
标签:LeetCode题目解答
[LeetCode] Peeking Iterator 顶端迭代器
Given an Iterator class interface with methods: next() and hasNext(), design and impleme…
[LeetCode] Rearrange String k Distance Apart 按距离为k隔离重排字符串
Given a non-empty string str and an integer k, rearrange the string such that the same characters are a…
[LeetCode] Insert Delete GetRandom O(1) 常数时间内插入删除和获得随机数
Design a data structure that supports all following operations in average O(1) time. &nb…
[LeetCode] License Key Formatting 注册码格式化
Now you are given a string S, which represents a software license key which we would like to format. Th…
[Leetcode] Palindrome Permutation 回文变换
Palindrome Permutation Given a string, determine if a permutation of the string could form a palindrome. For e…
【leetcode】73. Set Matrix Zeroes 矩阵为0的位的行、列原地都置为0
1. 题目 Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. 对matrixi==…
[LeetCode] Count and Say 计数和读法
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ..…
[LeetCode] Second Minimum Node In a Binary Tree 二叉树中第二小的结点
Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node …
[LeetCode] Custom Sort String 自定义排序的字符串
S and T are strings composed of lowercase letters. In S, no letter occurs more than…
力扣(LeetCode)377
题目地址:https://leetcode-cn.com/probl…题目描述:在上次打劫完一条街道之后和一圈房屋后,小偷又发现了一个新的可行窃的地区。这个地区只有一个入口,我们称之为“根”。 除了“根”之外…
[LeetCode] Longest Valid Parentheses 最长有效括号
Given a string containing just the characters '(' and ')', find the length of the longes…