Tag：Palindrome

Time：202159
680. Verify palindrome string II Title Source: https://leetcodecn.com/problems/validpalindromeii subject Given a non empty string s, at most one character is deleted. Determine whether it can be a palindrome string. Example 1: Input: “ABA” Output: true Example 2: Input: “ABCA” Output: true Explanation: you can delete the C character. be careful: The string contains only lowercase […]

Time：2021430
Title Description Given a string containing only lowercase letters, find the length of its longest palindrome substring. Palindrome string refers to the character string with left and right symmetry. Thinking of solving problems When the string is not empty, the palindrome substring is at least one character, that is, the initial length is 1. When […]

Time：2021426
subject Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1:Input: 121Output: true Example 2:Input: 121Output: falseExplanation: From left to right, it reads 121. From right to left, it becomes 121. Therefore it is not a palindrome. Example 3:Input: 10Output: falseExplanation: Reads 01 from right to left. […]

Time：2021413
What is a collision pointer? First knowledge Algorithm diagram Collision process diagram Array and collision pointer in JavaScript How to define collision pointer in JS? Implementation of a simplest collision pointer Leetcode collision pointer solution problem 7. Integer inversion (easy) 9. Palindrome number (easy) 27. Remove element (easy) 125. Verify palindrome string (easy) 167. II […]

Time：2021331
Title Requirements: Idea 1 (converting STR to list) First judge whether the number is less than 0, and return false if it is less than 0 Judge whether the number is less than 10. If it is less than 10, return true, because the single digit is palindrome If the above two items do not […]

Time：2021327
Title Description For a natural number n, if the number N1 obtained by inversing the digits of n is equal to N, then n is called palindrome number, such as 2332.If given an n (2 < = n < = 16) base number m (the length of M is less than 100 bits), if M […]

Time：2021318
PS: I give myself a nickname. You can call me 233 sauce Why brush leetcode To quote from the left ear mouse uncle mouse: ““ The questions on leetcode are used by some classic companies to interview candidates. Many people use these questions to apply for companies that like interview algorithms, such as Google, Microsoft, […]

Time：2021311
125. Verify palindrome string Title Source: leetcode https://leetcodecn.com/problems/validpalindrome subject Given a string, verify whether it is palindrome string, only consider alphabetic and numeric characters, can ignore the case of letters. Note: in this topic, we define an empty string as a valid palindrome string. Example 1: Input: “a man, a plan, a canal: Panda” Output: […]

Time：202135
The first question of new year’s brush is as follows: Give you a string s and find the longest palindrome substring in S. Example 1: Enter: S = “bad”Output: “bab”Explanation: “ABA” is also the answer to the question.Example 2: Enter: S = “CBBD”Output: “BB”Example 3: Input: S = “a”Output: “a”Example 4: Enter: S = […]

Time：2021210
Stack What is stack Stack operation Implement a stack class Application of stack Privatization of stack properties What is stack The stack is a list of elements that can only be accessed from one end of the list (called the top). A common, reallife example is the tray stack in the cafeteria. Trays are always […]

Time：2021110
ARTS Arts is an activity launched by Chen Hao in the geek time column. The purpose is to keep learning through sharing. Each person writes an arts every week: algorithm is an algorithm problem, review is to read an English article, technology / tips is to share a small technology, share is to share a […]

Time：20201128
Longest Palindromic Substring difficultysecondaryGiven a strings, foundsThe longest palindrome string in. You can assume thatsThe maximum length of is 1000. as everyone knows,Palindrome substring is a certain axis as the center, left and right mirror symmetryHow to find the longest palindrome substring in S? 1. Violent cracking Brute force cracking is the most easy way […]