Specific use of MySQL segmentation function substring()

Directory 1. LEFT() function Two, RIGHT () function Three, SUBSTRING () function Four, SUBSTRING_INDEX () function 5. Practical operation MySQL string interception functions mainly include: left(), right(), substring(), substring_index(). Each has its usage scenarios. Today, let me take you a few minutes to familiarize yourself with them, Mark! One, LEFT() function LEFT(string,length) , starting from […]

Sliding window technique to solve substring problem

1. Code framework Implemented using hash table + double pointer; The double pointer refers to the left and right border pointers of the user maintenance sliding window; /* Sliding window algorithm framework */ void slidingWindow(String s) {<!– –> // Record the data in the window with the appropriate data structure HashMap<Character, Integer> window = new […]

6.30 Longest substring without repeated characters, reverse linked list, LRU cache mechanism

The longest substring without repeating characters Longest substring without repeating characters Given a string s , please find the length of the longest substring that does not contain repeated characters. Example 1: Input: s = “abcabcbb” output: 3 Explanation: Since the longest substring without repeating characters is “abc”, its length is 3. Example 2: Input: […]

Deciphering Substring Magic: Exploring the String Class in Java

Article directory 1. length() 2. charAt(int index) 3. substring(int beginIndex) 4. substring(int beginIndex, int endIndex) 5. equals(String anotherString) 6. equalsIgnoreCase(String anotherString) 7. contains(CharSequence sequence) 8. indexOf(int ch) 9. lastIndexOf(int ch) 10. startsWith(String prefix) 11. endsWith(String suffix) 12. toLowerCase() 13. toUpperCase() 14. trim() Java’s String class provides many common methods to manipulate strings. The following are […]

[Algorithm question] The longest palindrome substring, parenthesis generation, jumping game in the intermediate stage of dynamic programming

Intermediate stage of dynamic programming foreword 1. The longest palindrome substring 1.1. Ideas 1.2. Code implementation 2. Bracket generation 2.1. Ideas 2.2. Code implementation 3. Jumping Game II 3.2. Ideas 3.2. Code implementation Summarize Foreword Dynamic programming (Dynamic Programming, DP for short) is a method to solve the optimization problem of multi-stage decision-making process. It […]

LeetCode 1371. Find the Longest Substring Containing Vowels in Even Counts [exclusive or prefix sum, bit operation, hash table, string] medium

This article is one of the “Conquering LeetCode” series of articles, which officially started on 2021/08/12. Since some questions on LeetCode are locked, this series will continue at least until the day when all unlocked questions are finished; because LeetCode is constantly creating new questions, the end date of this series may be forever. In […]

js uses one method to handle all string interception: break through the limitation of substring

String is the most basic data type. It has three most common operations: concatenation, separation, and interception. Today we will talk about string interception. Overview When it comes to the interception of strings, we may use substring the most. It does provide us with convenience, but you will find that it also has many limitations […]

[Different paths + minimum path and + longest palindrome substring] Two-dimensional dynamic programming: establish a two-dimensional array to solve dynamic rules

Article directory 1. Different paths 1. Topic 2. Solution Second, the minimum path and 1. Topic 2. Solution 3. The longest palindrome substring 1. Topic 2. Solution 1. Different paths 1. Title Leetcode link: https://leetcode.cn/problems/unique-paths/ 2. Solution 1) Define the dp array: We define dp[i][j] as the number of path types to reach the grid […]

Foundation Building of Algorithm Practice – Early Stage 2 of Foundation Building (Solving the Longest Palindromic Substring Problem, Manacher Algorithm Template)

? Blogger: Light of Destiny Column: Algorithm Practice: Qi Practice Column: Foundation Building of Algorithm Practice ?Other articles of the blogger: Click to enter the blogger’s homepage Foreword: After learning the chapter on Qi training of algorithmic practice, you must have a very solid foundation of konjacs. Let’s move on to the chapter on building […]