• Leetcode 680. Verify palindrome string II | Python


    680. Verify palindrome string II Title Source: https://leetcode-cn.com/problems/valid-palindrome-ii 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 […]

  • Python brush topic: Longest palindrome substring (string)


    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 […]

  • The journey of leetcode


    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. […]

  • The beauty of discovery algorithm: collision pointer of two pointers


    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 […]

  • Leetcode 9. Palindrome number in Python


    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 […]

  • On palindrome number


    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 […]

  • Brush leetcode series with 233 sauce


    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, […]

  • Leetcode 125. Verify palindrome string | Python


    125. Verify palindrome string Title Source: leetcode https://leetcode-cn.com/problems/valid-palindrome 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: […]

  • [longest palindrome substring of leetcode Hot 100]


    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 = […]

  • Basic knowledge of stack


    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, real-life example is the tray stack in the cafeteria. Trays are always […]

  • Arts Week 15 | longest palindrome subsequence of leetcode | from Uber’s go programming specification


    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 […]

  • String of algorithm — longest palindrome substring


    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 […]