Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, "A man, a plan ...
Given a string containing only three types of characters: , and , write a function to check whether this string is valid. We define the validity of a string by these rules: Any left parenthesis must ...
2017-10-01 12:40 3 7548 推荐指数:
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, "A man, a plan ...
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Example 2: Note ...
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid ...
We are given two strings, A and B. A shift on A consists of taking string A and moving the leftmost character to the rightmost position. ...
Given an array of characters, compress it in-place. The length after compression must always be ...
A magical string S consists of only '1' and '2' and obeys the following rules: The string S is magical because ...
题目描述 题目难度:简单 给定一个只包括 '(',')','{','}','[',']' 的字符串,判断字符串是否有效。 有效字符串需满足: 左括号必须用相同类型的右括号闭合。左括号必须以正确的顺序闭合。注意空字符串可被认为是有效字符串。 示例 1: 输入: "()"输出: true ...
题目描述如下: 给定一个字符串,验证它是否是回文串,只考虑字母和数字字符,可以忽略字母的大小写。 说明:本题中,我们将空字符串定义为有效的回文串。 示例 1: 示例 2: class Solution { public: bool isPalindrome ...