Java enumeration based on Java

Ramble Yesterday, I happened to encounter a small problem with enumeration, and then found that I am not so familiar with it. Then in development, enumeration is used very much, so I have today's article. What is enumeration Enumeration in Java is a type, just as the name suggests: it is enumerated one by one. Therefore, it generally represe ...

Posted by ben2k8 on Mon, 07 Mar 2022 23:22:58 +0100

Algorithm Title: regular expression matching (title + idea + code + comment)

subject Regular Expression Matching Give you a string s and a character rule p, please implement a support '.' Matches the regular expression of '*'. ‘.’ Match any single character '*' matches zero or more preceding elements The so-called matching is to cover the whole string s, not part of the string. Example 1: Input: s = &q ...

Posted by Robert Plank on Mon, 07 Mar 2022 19:20:41 +0100

C + + string processing problem

1, Title 1.1 Title picture 1.2 Title Document #include <iostream> #include <ctime> using namespace std; //Define a type def that will be very useful when we implement our functions. typedef char* charPointer; //This type def will make cstring parameter passing by reference easy to debug //Example void foo(charPointer& x) ...

Posted by powerpants on Sat, 05 Mar 2022 01:48:14 +0100

boost::string_ Use of ref compile time strings

std::string itself realizes the management of character array and provides common functions of string class, For example, lookuptoggle casestructure wait But std::string is a runtime calculation after all. As we all know, after std C++11, it supports calculating some constant values during compiler compilation, which can reduce runtime work ...

Posted by p0pb0b on Fri, 04 Mar 2022 23:13:40 +0100

Simple implementation of dictionary tree, prefix tree and Trie tree [insert, search and find prefix]

Simple implementation of dictionary tree, prefix tree and Trie tree [insert, search and find prefix] 1.Trie tree Trie tree, namely prefix tree, also known as word lookup tree and dictionary tree, is a tree structure and a variant of hash tree. The typical application is to count and sort a large number of strings (but not limited to strings), ...

Posted by Courbois on Fri, 04 Mar 2022 21:07:43 +0100

2021-04-16-Redis summary

Redis five data types String (String) be careful: The value of string is not limited to strings, such as ordinary strings, complex strings such as JSON,XML, numbers and even binary, but it can not exceed 512MB Next, let's demonstrate the basic operations of adding, deleting, modifying and querying SET key value GET key DEL key MSET key1 ...

Posted by cdpapoulias on Fri, 04 Mar 2022 07:11:24 +0100

Familiar with common classes

Hello, everyone! I'm Xiao Sheng! I learned the knowledge of classes and objects from Mr. Han Shunping and gained a lot! Now let's share our notes! Common class Wrapper class Classification of packaging PackagingBasic data typeDirect parent classbooleanBooleanObjectcharCharacterObjectbyteByteNumbershortShortNumberintIntNumberlongLon ...

Posted by chen2424 on Fri, 25 Feb 2022 16:44:30 +0100

MySQL string interception

In the development process, it is sometimes encountered that only a part of a certain field of the database is required. Sometimes, this scenario is more convenient and faster to operate directly through the database than through code. MySQL has many string functions that can be used to deal with these requirements, such as left, right, subs ...

Posted by mchannel on Wed, 23 Feb 2022 03:29:19 +0100

[force buckle question type summary and template] sword finger offer 1 - array and string

Question type summary subjectsummarypracticekey wordFind in 2D arrayIn an n * m two-dimensional array, each row is sorted in ascending order from left to right, and each column is sorted in ascending order from top to bottom. Please complete an efficient function, input such a two-dimensional array and an integer, and judge whether the arr ...

Posted by cloudnyn3 on Mon, 21 Feb 2022 03:59:30 +0100

Classes commonly used in java (note 16)

1, String related classes 1. Create string Properties of String public final class String implements java.io.Serializable, Comparable<String>, CharSequence { /** The value is used for character storage. */ private final char value[]; /** Cache the hash code for the string */ private int hash; // Default to 0 Specific JDK API St ...

Posted by nedpwolf on Sun, 20 Feb 2022 11:10:40 +0100