LeetCode - #10 regular expression matching (top 100)

preface This topic is the top 100 high frequency questions of LeetCode Our community will gradually organize the Swift Algorithm Solutions of Gu Yi (Netflix growth hacker, author of iOS interview, ACE professional fitness coach. Microblog: @ Taoist Gu Yin) into text versions to facilitate everyone's learning and reading. So far, we have upda ...

Posted by cohq82 on Mon, 03 Jan 2022 22:09:40 +0100

Advanced sort: quick sort (super detailed)

I summary Quick sort is an improvement of bubble sort. Its basic idea is to divide the data to be sorted into two independent parts through one-time sorting. All the data in one part is smaller than all the data in the other part, and then quickly sort the two parts of data according to this method. The whole sorting process can be recursive, s ...

Posted by Ristiisa on Mon, 03 Jan 2022 21:19:42 +0100

Introduction to suffix array and Golang implementation

Suffix array is used to solve a series of problems related to string pattern matching. Because I compare dishes and am not ACMer, this article is mainly used to literacy, which is very simple   First introduce some concepts: sa: suffix array. Rank all n suffixes of the original string (length n) in dictionary order. sa[i]=k means that the start ...

Posted by luv2climb on Mon, 03 Jan 2022 14:42:12 +0100

Java description LeetCode, 98 Validate binary search tree

Hello everyone, I'm hehaige and focus on the back end. If I can, I want to be a code designer instead of an ordinary coder to witness the growth of hehaige. Your comments and praise are my biggest driving force. If you have any mistakes, please don't hesitate to comment. Thank you very much. Let's support the original! If there is a clerical er ...

Posted by Ofro04 on Mon, 03 Jan 2022 14:02:28 +0100

Educational Codeforces Round 112 (Rated for Div. 2)

A,PizzaForces Title Link: PizzaForces Main idea of the title: it is required to order n pizzas. The available options are 6 pizzas / 15min, 8 pizzas / 20min and 10 pizzas / 25min. What is the minimum time required to get enough pizza. Idea: we were stuck at the beginning. We can easily see that it takes 2.5 minutes for each pizza, so the ...

Posted by SoundreameR on Mon, 03 Jan 2022 12:39:48 +0100

Spectral wavelength screening algorithm

Catalogue of series articles Near infrared spectroscopy is a cross cutting field, which requires cooperation in chemistry, computer science, bioscience and other fields. To this end, Under the guidance of (teacher Yang Huihua team of Beijing University of Posts and Telecommunications), we will prepare to open source the traditional classical a ...

Posted by leatherback on Mon, 03 Jan 2022 10:57:29 +0100

Full rank decomposition of matrix theory code practice

principle   in this article, let's introduce full rank factorization, which is defined as follows: A ∈ F m × n ...

Posted by franko75 on Mon, 03 Jan 2022 10:00:40 +0100

A case of HDU 1425 illustrates the process of bubble sorting and quick sorting

Detailed bubble sort and quick sort Generally speaking, the questions given by the competition generally have a variety of solutions. It assesses the problem-solving in a limited time and space. If the conditions are very loose, you can choose the easiest algorithm to program among a variety of solutions; If the given conditions are harsh, the ...

Posted by kaisellgren on Mon, 03 Jan 2022 09:30:49 +0100

lintcode python grammatical familiarity (132 channels)

Write at the beginning Just to familiarize yourself with python's basic grammar, so some solutions may be more general and refer to some good ideas, which are listed here for easy review and learning. Because time is limited, you may choose more topics in the first three grades to focus on. The difficult and super difficult topics will be lo ...

Posted by ('(' on Mon, 03 Jan 2022 08:34:38 +0100

Eight sorting, time complexity and space complexity

1. Complexity 1.1 time complexity Total execution times of statements: t (n) = O (f (n)) f (n) is a function of the problem scale n. It means that with the increase of problem scale n, the growth rate of algorithm execution time is the same as that of F (n). Generally, we only care about the term that has the greatest influence on the result ...

Posted by Mikemcs on Mon, 03 Jan 2022 08:07:31 +0100