Introduction to Algorithms (Day1)

catalogue 1. Search in two-dimensional array 2. Rotate the minimum number of the array 3. Adjust the array order so that odd numbers precede even numbers More than half of the number in the array 1. Search in two-dimensional array Core test points: array correlation, characteristic observation, grasp of time complexity [description] In ...

Posted by phpnewby1918 on Wed, 02 Feb 2022 09:58:07 +0100

#GCC programming # signal in Linux

SIGNAL Signals appeared in early Unix, and the early signal model is unreliable. BSD and System V extend the early signals respectively, but they are incompatible with each other. POSIX unifies the above two models, thus providing a reliable signal model. 1. Basic concept of signal It is used for communication between processes. It can inter ...

Posted by seriousdamage on Wed, 02 Feb 2022 08:23:48 +0100

The second day of C language review -- Tan Haoqiang Chapter III after class exercises

1. If the annual growth rate of China's gross national product is 9%, calculate the percentage increase of China's gross national product in 10 years. The calculation formula is p = (1 + r) ^ n, r is the annual growth rate, n is the number of years, and P is the multiple compared with now #include<stdio.h> #include<stdlib.h> #i ...

Posted by theprofession on Wed, 02 Feb 2022 06:28:56 +0100

From zero foundation to complete mastery of C language series Chapter 4 - array

array 1. Creation and initialization of one-dimensional array Array; A collection of elements of the same type. How to create an array: type_t arr_name [const_n]; //type_t is the element type of the index group //const_n is a constant expression that specifies the size of the array Instance of array creation: //Code 1 int arr1[ ...

Posted by garethj on Wed, 02 Feb 2022 05:42:25 +0100

Review the old and know the new - > data structure - > sorting - > program implementation 1_ Using C language

Review the old and know the new - > data structure - > sorting - > program implementation 1_ Using C language This blog is based on Review the old and know the new - > data structure - > sorting Part of the theoretical knowledge of sorting in the program! Among them, three kinds of quick sorting in exchange sorting, recursive a ...

Posted by Karlos2394 on Wed, 02 Feb 2022 03:59:01 +0100

String + memory function

0. Preface The processing of characters and strings in C language is very frequent, but C language itself has no string type. Strings are usually placed in constant strings or character arrays. String constants apply to string functions that do not modify them 1. Function introduction strlen #include<stdio.h> #include<asse ...

Posted by jestaji on Wed, 02 Feb 2022 02:47:10 +0100

Brother Jiang takes you to play with C language | 10- C language array

Basic concept of array Array, literally, means a set of data. Yes, array is used to store a set of data In C language, array belongs to construction data type Several nouns of array Array: an ordered collection of data of the same data typeArray element: each data that constitutes an array.Subscript of array: index of array element pos ...

Posted by kat89 on Wed, 02 Feb 2022 01:08:42 +0100

Lecture 9 of Blue Bridge Cup -- difference [example / exercise]

preface Blue Bridge Cup Official Website: Blue Bridge Cup - National College Students TMT industry competition โœจ This blog explains the algorithm knowledge involved in the Blue Bridge Cup C/C + + preparation. This blog is the ninth lecture: difference [examples / exercises] The exercises included in this blog are: ๐Ÿ‘Š Difference ๐Ÿ‘Š Differ ...

Posted by Josh1billion on Tue, 01 Feb 2022 22:33:37 +0100

c language pointer

summary When defining a variable, the corresponding memory size is reserved, and the variable name therefore corresponds to the address of the variable. The number of memory locations reserved depends on the data type. (& name / function) can be used to determine the memory address,% p represents the output address type data #include < ...

Posted by jadeddog on Tue, 01 Feb 2022 21:54:30 +0100

The simplest function

preface In mathematics, we have learned many kinds of functions, such as logarithmic function, exponential function and so on. These make my brain ache when I see them. Now I still remember that my high school mathematics teacher filled the whole blackboard in high spirits, wiped it and then wrote it. I can only stare at him like a silly ...

Posted by jeppers on Tue, 01 Feb 2022 19:58:11 +0100