205 Ruby first experience: array, hash and regular expression [Rails back-end development training camp]

The previous lectures introduced Ruby's basic data objects "string" and "value". Ruby has more than these two data objects. The structure of data objects involved in most Ruby programs is much more complex. This lecture summarizes arrays, hashes, and regular expressions. Don't worry, the knowledge here will be briefly explai ...

Posted by TheCase on Wed, 24 Nov 2021 15:46:20 -0800

Hahaha ~ tic tac toe chess (unintentional version), come and have a preliminary taste of the fun of the code world

preface Hello everyone! I haven't seen you for a long time. The forever is here again. I've been very busy recently, so I haven't updated it for a long time. Last time I introduced the function related knowledge, and then this time we'll have a little episode to show you the tic tac toe game! However, due to the tight time recently, I'll ...

Posted by agisthos on Wed, 24 Nov 2021 15:37:13 -0800

Huawei 4.16 algorithm three questions

Huawei 04.16 reply to three algorithm questions 1. Invert the substring between each pair of parentheses Give a string s (containing only lowercase letters and parentheses). Please reverse each pair of matching strings in parentheses layer by layer from inside to outside of parentheses, and return the final result. Note that your results sh ...

Posted by RJDavison on Tue, 23 Nov 2021 20:05:56 -0800

C + + core programming

##0. Preface Recently, when doing algorithm transplantation, I found that I had forgotten a lot about c + +, so I planned to pick it up again. I feel shallow on paper. I never know that I have to practice it It has always been the principle of my study and work. I prefer hands-on. So I knocked the basic knowledge of c + + line by line, no matte ...

Posted by Leshiy on Tue, 23 Nov 2021 17:26:52 -0800

[edit distance problem] and output the editing process through backtracking

Title Description: Given a source string and a target string, the following operations can be performed on the source string: Insert a character at any position; Replace any character; Delete any character. Write a program to return the minimum number of operations, so that the source string is equal to the target string after the above operat ...

Posted by Crayon Violent on Tue, 23 Nov 2021 14:55:12 -0800

(Heap Sort) heap sorting is super detailed. I don't believe you can't (implemented in c language code)

Basic introduction to heap Heap is a special kind of data structure in computer science. Heap is usually an array object that can be regarded as a complete binary tree. All its elements are stored in a one-dimensional array in the order of a complete binary tree, and the value of any parent node must be less than or equal to (greater tha ...

Posted by mlin on Tue, 23 Nov 2021 14:00:26 -0800

Time complexity

Time complexity: the time complexity of an algorithm is a function that qualitatively describes the running time of the algorithm. This is a function representing the length of the string of the input value of the algorithm. The time complexity is usually expressed by large O sign, excluding the low-order term and first term coefficient of this ...

Posted by predhtz on Tue, 23 Nov 2021 09:06:17 -0800

Teach you to play real nixie tube

Our ultimate goal is to be lazy. Working together is to see you work hard, and I am lazy to enjoy. Therefore, in order to be lazy, frame programming is inevitable. In my blog in the future, I hope everyone is frame programming. Those who are irregular should be serious and diligent. We are too lazy to be worthy of you. joy:, remember that we ar ...

Posted by nickk on Tue, 23 Nov 2021 08:40:05 -0800

Basic eight sorts

sort 1. Concept of sorting Sorting: the so-called sorting is the operation of arranging a string of records incrementally or decrementally according to the size of one or some keywords. Stability: if there are multiple records with the same keyword in the record sequence to be sorted, the relative order of these records remains unchanged aft ...

Posted by Kondie on Tue, 23 Nov 2021 06:25:57 -0800

Common problem solving methods (bit operation, double pointer, prefix and)

This paper summarizes some common simple problem-solving methods encountered in the process of brushing questions: Array is a kind of linear table in data structure. It is often displayed in the form of integer array and string in algorithm problems. In fact, the array contains more data types. This paragraph mainly explains the solutions ...

Posted by zoozle on Tue, 23 Nov 2021 05:43:37 -0800